Merge pull request #963 from lsst-it/IT-4853/exch-ls #1770
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: 'Commit Message Check' | |
"on": | |
- "push" | |
jobs: | |
check-commit-message: | |
name: "Check Commit Message" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Check Commit Type" | |
uses: "gsactions/commit-message-checker@v2" | |
with: | |
pattern: '\([^)]+\) .+$' | |
flags: "gm" | |
error: "Your first line has to contain a commit type like '(role/foo)'." | |
checkAllCommitMessages: "true" | |
accessToken: "${{ secrets.GITHUB_TOKEN }}" | |
- name: "Check Line Length" | |
uses: "gsactions/commit-message-checker@v2" | |
with: | |
pattern: "^(?!.{73})" | |
error: "The maximum line length of 72 characters is exceeded." | |
checkAllCommitMessages: "true" | |
accessToken: "${{ secrets.GITHUB_TOKEN }}" |