Skip to content

feat[ci]: add PR title validation #16

feat[ci]: add PR title validation

feat[ci]: add PR title validation #16

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 uppercase letter: '{subject}'
(Full PR title: '{title}')
headerPattern: '^(\w*)(?:\[([\w$.\-*/ ]*)\])?: (.*)$'
validateSingleCommit: true
validateSingleCommitMatchesPrTitle: true