feat[ci]: add PR title validation #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |