Add action to check commit messages for line length.
This commit is contained in:
parent
1e031ae63a
commit
7902ac5256
1 changed files with 34 additions and 0 deletions
34
.github/workflows/commit-message-check.yml
vendored
Normal file
34
.github/workflows/commit-message-check.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: 'Commit Message Check'
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- edited
|
||||
- reopened
|
||||
- synchronize
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- 'releases/*'
|
||||
|
||||
jobs:
|
||||
check-commit-message:
|
||||
name: Check Commit Message
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# - name: Check Commit Type
|
||||
# uses: gsactions/commit-message-checker@v1
|
||||
# with:
|
||||
# pattern: '\[[^]]+\] .+$'
|
||||
# flags: 'gm'
|
||||
# error: 'Your first line has to contain a commit type like "[BUGFIX]".'
|
||||
- name: Check Line Length
|
||||
uses: gsactions/commit-message-checker@v1
|
||||
with:
|
||||
pattern: '^[^#].{78}'
|
||||
error: 'The maximum line length of 78 characters is exceeded.'
|
||||
# - name: Check for Resolves / Fixes
|
||||
# uses: gsactions/commit-message-checker@v1
|
||||
# with:
|
||||
# pattern: '^.+(Resolves|Fixes): \#[0-9]+$'
|
||||
# error: 'You need at least one "Resolves|Fixes: #<issue number>" line.'
|
Loading…
Reference in a new issue