Skip to content

feat[ci]: add PR title validation #12

feat[ci]: add PR title validation

feat[ci]: add PR title validation #12

Workflow file for this run

# jobs to validate pull request well-formedness
name: Validate PR metadata
on:
pull_request:
types:
- opened
- edited
- synchronize
permissions:
pull-requests: read
jobs:
conventional-commit:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/amannn/action-semantic-pull-request?tab=readme-ov-file#configuration
with:
types: |
feat
fix
chore
refactor
scopes: |
ci
docs
test
lang
ux
tool # integration
ir # old IR updates
venom
requireScope: true
subjectPattern: '^(?[a-z]).+$'
subjectPatternError: |
"Starts with non-lowercase letter: `{subject}`"
headerPattern: '^(\w*)(?:\[([\w$.\-*/ ]*)\])?: (.*)$'
validateSingleCommit: true
validateSingleCommitMatchesPrTitle: true