Fix pull requests commit messages checks #6
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 commit lines 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' | |
checkAllCommitMessages: 'true' | |
accessToken: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check for Resolves/Fixes links in PR description | |
uses: gsactions/commit-message-checker@v2 | |
with: | |
pattern: '(Resolves|Fixes):? (?:https:\/\/github.com\/)?AlmaLinux\/build-system(\/issues\/|#)[0-9]+$' | |
error: 'You need at least one "Resolves|Fixes: <issue link>" line.' |