38 lines
947 B
YAML
38 lines
947 B
YAML
name: pr-title
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, edited, synchronize, reopened]
|
|
branches: [main]
|
|
|
|
permissions:
|
|
pull-requests: read
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Validate PR title follows Conventional Commits
|
|
uses: amannn/action-semantic-pull-request@v5
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
# Allowed conventional commit types (must match cliff.toml commit_parsers)
|
|
types: |
|
|
feat
|
|
fix
|
|
perf
|
|
refactor
|
|
docs
|
|
chore
|
|
ci
|
|
test
|
|
release
|
|
# Require lowercase subject
|
|
subjectPattern: ^[a-z].*$
|
|
subjectPatternError: |
|
|
The PR title subject must start with a lowercase letter.
|
|
Example: "feat: add release notes dialog"
|
|
# Do not require a scope
|
|
requireScope: false
|