Skip to content

feat[ci]: add PR title validation #33

feat[ci]: add PR title validation

feat[ci]: add PR title validation #33

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:
validate-pr:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
name: Run conventional commit checker
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
# ci: continuous integration
# docs: documentation
# test: test suite
# lang: language changes
# ux: language changes (UX)
# tool: integration
# ir: (old) IR/codegen changes
# venom: venom changes
scopes: |
ci
docs
test
lang
ux
tool
ir
venom
requireScope: true
subjectPattern: '^(?![A-Z]).+$'
subjectPatternError: |
Starts with uppercase letter: '{subject}'
(Full PR title: '{title}')
headerPattern: '^(\w*)(?:\[([\w$.\-*/ ]*)\])?: (.*)$'
validateSingleCommit: true
validateSingleCommitMatchesPrTitle: true