name: 'Commit Message Check' on: pull_request: types: - opened - edited - reopened - synchronize push: branches: - master - 'releases/*' jobs: check-commit-message: name: Check Commit Message runs-on: ubuntu-latest steps: # - name: Check Commit Type # uses: gsactions/commit-message-checker@v1 # with: # pattern: '\[[^]]+\] .+$' # flags: 'gm' # error: 'Your first line has to contain a commit type like "[BUGFIX]".' - name: Check Line Length uses: gsactions/commit-message-checker@v1 with: pattern: '^[^#].{78}' error: 'The maximum line length of 78 characters is exceeded.' # - name: Check for Resolves / Fixes # uses: gsactions/commit-message-checker@v1 # with: # pattern: '^.+(Resolves|Fixes): \#[0-9]+$' # error: 'You need at least one "Resolves|Fixes: #" line.'