openmv/.github/workflows/commit.yml
iabdalkader b552388d49 misc/github: Update workflows.
* Update workflow runner image.
* Install Python for main build.
* Install Vela compiler.
2024-07-23 10:40:39 +03: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-22.04
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 }}