Skip to content

Commit

Permalink
[TASK] Make sure to check latest commit message. This line is toooooo…
Browse files Browse the repository at this point in the history
… long, I mean, really tooooooo long!

This change makes sure we always check the latest commit message
and not an outdated one. This is needed for updated RPs.

GsActions/commit-message-checker#95
  • Loading branch information
fnagel committed Nov 24, 2023
1 parent 9e94881 commit cf55238
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .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}$'
pattern: "^.{0,72}(\n.*)*$"
flags: 'gm'
error: 'The maximum line length of 72 characters is exceeded.'
excludeTitle: true
excludeDescription: true
checkAllCommitMessages: true
accessToken: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit cf55238

Please sign in to comment.