chore: allow branch names starting with create-pull-request/#231
Merged
shenxianpeng merged 1 commit intoJul 1, 2026
Merged
Conversation
Add allow_branch_names to commit-check.toml so that branches created by actions like peter-evans/create-pull-request (e.g., create-pull-request/patch) pass the conventional branch validation. Closes #225
📝 WalkthroughWalkthroughUpdates the commit-check.toml configuration file to add an allow_branch_names rule under the [branch] section, permitting branch names matching the pattern create-pull-request/.+. ChangesBranch Name Rule Update
Estimated code review effort: 1 (Trivial) | ~2 minutes Related issues: Suggested labels: configuration Suggested reviewers: N/A 🐰
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
Commit-Check ✔️ |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #225 by adding
allow_branch_names = ["create-pull-request/.+"]tocommit-check.toml.Background
The
peter-evans/create-pull-requestGitHub Action creates branches likecreate-pull-request/patch. These branches were being rejected by commit-check becausecreate-pull-requestis not one of the allowed branch types in the inherited org-level conventional branch configuration.Change
Added
allow_branch_namesto the local[branch]section incommit-check.toml:This works alongside
conventional_branch = true(inherited from the org-level config) by providing an explicit allow-list of branch name patterns that bypass the conventional branch type check.Testing
The regex
create-pull-request/.+correctly matches branch names like:create-pull-request/patchcreate-pull-request/some-updateAnd still validates all other branches against the conventional branch spec.
Summary by CodeRabbit
create-pull-request/*branches, making automated pull request workflows more flexible.