Add GH action to checks that commit message follow the commit guidelines #1
Workflow file for this run
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: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
jobs: | |
check-commit-message: | |
name: Check Commit Message | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Line Length | |
uses: gsactions/commit-message-checker@v2 | |
with: | |
pattern: '^.{4,72}' | |
flags: 'gms' | |
error: 'The maximum line length of 72 characters is exceeded.' | |
excludeDescription: 'true' | |
excludeTitle: 'true' | |
- name: Check for Resolves / Fixes | |
uses: gsactions/commit-message-checker@v2 | |
with: | |
pattern: '(Resolves|Fixes) AlmaLinux\/build-system\#[0-9]+$' | |
error: 'You need at least one "Resolves|Fixes: <issue link>" line.' | |
excludeTitle: 'true' | |
excludeDescription: 'true' |