Skip to content

chore: allow branch names starting with create-pull-request/#231

Merged
shenxianpeng merged 1 commit into
mainfrom
feature/allow-branch-start-with-create-pull-request
Jul 1, 2026
Merged

chore: allow branch names starting with create-pull-request/#231
shenxianpeng merged 1 commit into
mainfrom
feature/allow-branch-start-with-create-pull-request

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #225 by adding allow_branch_names = ["create-pull-request/.+"] to commit-check.toml.

Background

The peter-evans/create-pull-request GitHub Action creates branches like create-pull-request/patch. These branches were being rejected by commit-check because create-pull-request is not one of the allowed branch types in the inherited org-level conventional branch configuration.

Change

Added allow_branch_names to the local [branch] section in commit-check.toml:

[branch]
require_rebase_target = "origin/main"
allow_branch_names = ["create-pull-request/.+"]

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/patch
  • create-pull-request/some-update

And still validates all other branches against the conventional branch spec.

Summary by CodeRabbit

  • Chores
    • Expanded branch name validation to allow create-pull-request/* branches, making automated pull request workflows more flexible.
    • Existing rebase requirements remain unchanged.

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
@shenxianpeng shenxianpeng requested a review from a team as a code owner July 1, 2026 14:41
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Updates 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/.+.

Changes

Branch Name Rule Update

Layer / File(s) Summary
Allow create-pull-request branch names
commit-check.toml
Adds allow_branch_names rule permitting branch names matching create-pull-request/.+ in the [branch] configuration section.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Related issues: #225 – allow branch start with create-pull-request/

Suggested labels: configuration

Suggested reviewers: N/A

🐰

A branch named "create-pull-request" once knocked,
The gate said no, so the rabbit balked.
One line of toml, a pattern applied,
Now that branch name slips right inside.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The change satisfies #225 by permitting branch names like create-pull-request/patch in branch validation.
Out of Scope Changes check ✅ Passed The only code change is the targeted branch-name allowance, with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly matches the main change: allowing create-pull-request/ branch names in branch validation.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/allow-branch-start-with-create-pull-request

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Commit-Check ✔️

@shenxianpeng shenxianpeng changed the title fix: allow branch names starting with create-pull-request/ chore: allow branch names starting with create-pull-request/ Jul 1, 2026
@shenxianpeng shenxianpeng added the chore Choses update label Jul 1, 2026
@shenxianpeng shenxianpeng merged commit c10f030 into main Jul 1, 2026
17 checks passed
@shenxianpeng shenxianpeng deleted the feature/allow-branch-start-with-create-pull-request branch July 1, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Choses update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow branch start with create-pull-request/

1 participant