openmv/.github/workflows/commit.yml
dependabot[bot] 31c2d4dd68
build(deps): bump gsactions/commit-message-checker from 1 to 2
Bumps [gsactions/commit-message-checker](https://github.com/gsactions/commit-message-checker) from 1 to 2.
- [Release notes](https://github.com/gsactions/commit-message-checker/releases)
- [Commits](https://github.com/gsactions/commit-message-checker/compare/v1...v2)

---
updated-dependencies:
- dependency-name: gsactions/commit-message-checker
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-19 15:30:33 +00:00

36 lines
1.1 KiB
YAML

name: '📜 Check Commit Messages'
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
branches:
- 'master'
jobs:
check-commit-messages:
runs-on: ubuntu-latest
steps:
- name: '📜 Check commit messages format'
uses: gsactions/commit-message-checker@v2
with:
pattern: '^[^!]+: [A-Za-z]+.+ .+\.$'
flags: 'gm'
error: 'Commit subject line must match the following pattern: <scope>: <description>.'
excludeTitle: 'false'
excludeDescription: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: '📜 Check commit messages length'
uses: gsactions/commit-message-checker@v2
with:
pattern: '^[^#].{10,78}$'
error: 'Commit subject line maximum line length of 78 characters is exceeded.'
excludeTitle: 'false'
excludeDescription: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}