name: PR Title
on:
pull_request:
types: [opened, edited, synchronize, reopened]
permissions:
pull-requests: read
jobs:
validate:
name: Validate PR Title
runs-on: ubuntu-latest
# Skip validation for Dependabot, thenvoi-argocd, and release-please PRs
if: github.actor != 'dependabot[bot]' && github.actor != 'thenvoi-argocd' && github.actor != 'release-please[bot]'
steps:
- name: Validate Conventional Commits format
uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Configure which types are allowed
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
# Configure which scopes are allowed (optional)
scopes: |
api
tools
auth
transport
config
deps
ci
# Require scope to be provided
requireScope: false
# Disable validation for merge commits
ignoreLabels: |
dependencies
automated
# Error message shown when validation fails
subjectPattern: ^.{1,80}$
subjectPatternError: |
PR title must be 80 characters or less.
Expected format: type(scope): description
Example: feat(tools): add new chat management tool
See CONTRIBUTING.md for details.