feat: accept scoped conventional-commit prefixes in PR title check#97
Conversation
Accept both the bare `type:` form and the scoped `type(scope):` form (e.g. `chore(rokt): ...`) so that scoped semantic titles no longer fail the check. Validation moves from a GitHub expression (startsWith only) to a shell regex, since expressions cannot match an arbitrary scope. The PR title is now passed via the environment instead of being interpolated into `run:`, removing a script-injection risk. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR SummaryLow Risk Overview Titles must match The PR title is read from Reviewed by Cursor Bugbot for commit 7ef73a9. Bugbot is set up for automated code reviews on this repo. Configure here. |
What
Adjusts the semantic PR title check (
pr-title-check.yml) to accept both forms of conventional-commit prefix:type:— the bare form it already accepts (e.g.chore: bump dependency)type(scope):— the scoped form (e.g.chore(rokt): bump dependency)Scoped titles like
chore(rokt): bump Rokt SDK dependency to 5.3.0 (SPM + CocoaPods)are still valid conventional-commit titles, but the current check only matchestype:viastartsWith(...)and fails them.How
startsWithand cannot match an arbitrary scope) to a shellgrep -Eregex:^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([^)]+\))?:run:, removing a script-injection risk that existed in the previous version.Test cases
chore(rokt): bump Rokt SDK dependency to 5.3.0 (SPM + CocoaPods)feat: add new eventfix(identity): handle nil MPIDUpdate READMEfeature: not a real typechore bump without colonNote on rollout
Consumer repos pin this workflow at
@stable. This PR targetsmain; thestabletag needs to be advanced for consumers (e.g.mparticle-apple-sdk) to pick up the change.🤖 Generated with Claude Code