mirror of
https://github.com/chainbase-labs/Agentkey.git
synced 2026-09-20 14:20:23 +08:00
ci: validate PR title instead of commit messages (#2)
## Summary The original `commitlint` workflow used `wagoid/commitlint-github-action@v6` which validates commit messages, not PR titles. Because the repo uses squash-merge with PR title as the commit message, the PR title is the right surface to validate. Replace with `amannn/action-semantic-pull-request@v5` which validates the PR title directly. Job name kept as `commitlint` so branch protection required-check context still resolves. ## Test plan - Verified the current action lets bad PR titles through if commits inside are conventional (closed test PR #1) - This PR title follows the policy; new action should pass - Post-merge smoke test: open a PR with a bad title like `test change`; expect fail Co-authored-by: lxcong <lxhtheresa@gmail.com>
This commit is contained in:
@@ -11,10 +11,23 @@ jobs:
|
||||
commitlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: wagoid/commitlint-github-action@v6
|
||||
- uses: amannn/action-semantic-pull-request@v5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
configFile: .commitlintrc.json
|
||||
firstParent: false
|
||||
failOnWarnings: false
|
||||
helpURL: https://www.conventionalcommits.org/
|
||||
types: |
|
||||
feat
|
||||
fix
|
||||
docs
|
||||
chore
|
||||
refactor
|
||||
test
|
||||
ci
|
||||
perf
|
||||
style
|
||||
requireScope: false
|
||||
subjectPattern: '^[a-z].+[^.]$'
|
||||
subjectPatternError: |
|
||||
The subject "{subject}" found in the PR title "{title}"
|
||||
did not match the pattern. The subject must start with a lowercase
|
||||
character and not end with a period.
|
||||
|
||||
Reference in New Issue
Block a user