Reusable Workflow Experiment: Upstreaming commit message 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: | ||
workflow_call: | ||
secrets: | ||
accessToken: | ||
required: true | ||
jobs: | ||
base-check-commit-message: | ||
name: Check Commit Message | ||
uses: gsactions/commit-message-checker@v2 | ||
Check failure on line 13 in .github/workflows/base-commit-message-checker.yml GitHub Actions / .github/workflows/base-commit-message-checker.ymlInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check Subject Begining | ||
uses: gsactions/commit-message-checker@v2 | ||
with: | ||
pattern: '^([A-Z]|\S+:|git subrepo pull)' | ||
flags: 'g' | ||
error: 'The subject does not start with a capital or tag.' | ||
excludeDescription: 'true' | ||
excludeTitle: 'true' | ||
checkAllCommitMessages: 'true' | ||
accessToken: ${{ secrets.accessToken }} | ||
- name: Check Subject Line Length | ||
uses: gsactions/commit-message-checker@v2 | ||
with: | ||
pattern: '^.{1,72}(\n|$)' | ||
flags: 'g' | ||
error: 'The maximum subject line length of 72 characters is exceeded.' | ||
excludeDescription: 'true' | ||
excludeTitle: 'true' | ||
checkAllCommitMessages: 'true' | ||
accessToken: ${{ secrets.accessToken }} | ||
- name: Check Subject Ending | ||
uses: gsactions/commit-message-checker@v2 | ||
with: | ||
pattern: '^.+(?<!\.)(\n|$)' | ||
flags: 'g' | ||
error: 'The subject cannot not end with a dot.' | ||
excludeDescription: 'true' | ||
excludeTitle: 'true' | ||
checkAllCommitMessages: 'true' | ||
accessToken: ${{ secrets.accessToken }} | ||
- name: Check Empty Line | ||
uses: gsactions/commit-message-checker@v2 | ||
with: | ||
pattern: '^.*(\n\n|$)' | ||
flags: 'g' | ||
error: 'No newline between title and description.' | ||
excludeDescription: 'true' | ||
excludeTitle: 'true' | ||
checkAllCommitMessages: 'true' | ||
accessToken: ${{ secrets.accessToken }} |