Skip to content

Reusable Workflow Experiment: Upstreaming commit message checks #6

Reusable Workflow Experiment: Upstreaming commit message checks

Reusable Workflow Experiment: Upstreaming commit message checks #6

---
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

View workflow run for this annotation

GitHub Actions / .github/workflows/base-commit-message-checker.yml

Invalid workflow file

invalid value workflow reference: references to workflows must be rooted in '.github/workflows'
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 }}