Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INVALID] Make sure latest commit message #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/commit-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,37 @@ jobs:
name: Check commit message
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check type prefix
uses: gsactions/commit-message-checker@v2
with:
pattern: '^(?:\[!!!\])?\[(BUILD|TASK|BUGFIX|FIX|FEATURE|DOC|CLEANUP|RELEASE){1}\] .+$'
flags: 'gm'
error: 'The first line needs to start with a commit type like "[BUGFIX]".'
excludeTitle: "true"
excludeDescription: "true"
checkAllCommitMessages: "true"
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check message format
uses: gsactions/commit-message-checker@v1
uses: gsactions/commit-message-checker@v2
with:
pattern: '^(?:\[!!!\])?\[[A-Z]+\] [A-Z]+.+$'
flags: 'gm'
error: 'The actual message after the commit type should start with a uppercase letter.'
excludeTitle: "true"
excludeDescription: "true"
checkAllCommitMessages: "true"
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check line length
uses: gsactions/commit-message-checker@v2
with:
pattern: '^.{10,72}$'
flags: 'gm'
error: 'The maximum line length of 72 characters is exceeded.'
excludeTitle: "true"
excludeDescription: "true"
checkAllCommitMessages: "true"
accessToken: ${{ secrets.GITHUB_TOKEN }}