Skip to content

Commit

Permalink
Merge pull request #48 from perlpunk/commit-message-checker
Browse files Browse the repository at this point in the history
ci: Use common commit message checker
  • Loading branch information
perlpunk authored Oct 26, 2023
2 parents 84ec8bb + 9d656c6 commit ea07342
Showing 1 changed file with 3 additions and 43 deletions.
46 changes: 3 additions & 43 deletions .github/workflows/commit_message_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,6 @@ on:

jobs:
check-commit-message:
name: Check commit message
runs-on: ubuntu-latest
steps:
- name: Check subject beginning
uses: gsactions/commit-message-checker@v1
with:
pattern: '^([A-Z]|[A-Za-z0-9_/.\-\s]+:|git subrepo pull)'
flags: 'g'
error: 'The subject does not start with a capital or tag.'
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check subject line length
uses: gsactions/commit-message-checker@v1
with:
pattern: '^.{1,72}(\n|$)'
flags: 'g'
error: 'The maximum subject line length of 72 characters is exceeded.'
excludeDescription: 'true' # excludes the description body of a pull request
excludeTitle: 'true' # excludes the title of a pull request
checkAllCommitMessages: 'true' # checks all commits associated with a pull request
accessToken: ${{ secrets.GITHUB_TOKEN }} # only required if checkAllCommitMessages is true
- name: Check subject ending
uses: gsactions/commit-message-checker@v2
with:
pattern: '^.+(?<!\.)(\n|$)'
flags: 'g'
error: 'The subject cannot end with a dot.'
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check empty line
uses: gsactions/commit-message-checker@v1
with:
pattern: '^.*(\n\n|$)'
flags: 'g'
error: 'No newline between title and description.'
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
secrets:
accessToken: "${{ secrets.GITHUB_TOKEN }}"
uses: os-autoinst/os-autoinst-common/.github/workflows/base-commit-message-checker.yml@master

0 comments on commit ea07342

Please sign in to comment.