Skip to content

Allow docs/, ci/, test/, refactor/ branches by defaultfeat: allow docs, ci, test, refactor branches by default - #504

Closed
sahilsaiyed-oss wants to merge 1 commit into
commit-check:mainfrom
sahilsaiyed-oss:allow-default-branch-types
Closed

Allow docs/, ci/, test/, refactor/ branches by defaultfeat: allow docs, ci, test, refactor branches by default#504
sahilsaiyed-oss wants to merge 1 commit into
commit-check:mainfrom
sahilsaiyed-oss:allow-default-branch-types

Conversation

@sahilsaiyed-oss

@sahilsaiyed-oss sahilsaiyed-oss commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR updates the default branch types so they are consistent with the default Conventional Commit types.

Changes

  • Added build
  • Added ci
  • Added docs
  • Added perf
  • Added refactor
  • Added test
  • Added style

Documentation

  • Updated README examples
  • Updated configuration documentation

Tests

  • Updated the default branch type test to cover the newly added branch prefixes.

This change is purely additive and does not affect existing valid branch names.

Summary by CodeRabbit

  • New Features

    • Expanded the default allowed branch types to include build, ci, docs, perf, refactor, style, and test.
    • Updated example configurations to reflect the additional branch types.
  • Documentation

    • Refreshed configuration guidance and examples with the expanded defaults.
  • Tests

    • Added validation coverage for the newly supported branch types.

@sahilsaiyed-oss
sahilsaiyed-oss requested a review from a team as a code owner July 31, 2026 17:46
@sahilsaiyed-oss
sahilsaiyed-oss requested review from shenxianpeng and removed request for a team July 31, 2026 17:46
@netlify

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploy Preview for commit-check ready!

Name Link
🔨 Latest commit fbc6c90
🔍 Latest deploy log https://app.netlify.com/projects/commit-check/deploys/6a6cdf9483788d00089f39d2
😎 Deploy Preview https://deploy-preview-504--commit-check.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The default allowed branch types now include build, ci, docs, perf, refactor, style, and test. Documentation and tests reflect the expanded list.

Changes

Default branch type expansion

Layer / File(s) Summary
Default types and validation
commit_check/__init__.py, tests/rule_builder_test.py
DEFAULT_BRANCH_TYPES includes seven additional prefixes. Tests verify the prefixes and representative branch names.
Configuration documentation
README.md, docs/configuration.rst
Examples and documented defaults list the expanded branch types.

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

Possibly related issues

  • commit-check/commit-check#494: Directly requests the default branch type, documentation, and validation test expansion.

Possibly related PRs

Suggested labels: enhancement, minor

Suggested reviewers: shenxianpeng, lntutor

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the change to allow additional branch prefixes by default, despite duplicated and concatenated wording.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 added documentation Improvements or additions to documentation tests Add test related changes labels Jul 31, 2026
@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/configuration.rst`:
- Around line 436-437: Update the allowed branch types documentation near the
conventional_branch description to include the renovate/ bot prefix alongside
dependabot/, matching the default branch-prefix behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1ce5215d-4980-4db4-9503-683d86356e2c

📥 Commits

Reviewing files that changed from the base of the PR and between 91c4a9f and fbc6c90.

📒 Files selected for processing (4)
  • README.md
  • commit_check/__init__.py
  • docs/configuration.rst
  • tests/rule_builder_test.py

Comment thread docs/configuration.rst
Comment on lines +436 to 437
- ["feature", "bugfix", "hotfix", "release", "chore", "feat", "fix", "build", "ci", "docs", "perf", "refactor", "test", "style"]
- Allowed branch types when conventional_branch is true. AI agent prefixes (``ai/``, ``claude/``, ``codex/``, ``copilot/``, ``cursor/``) and bot prefixes (``dependabot/``) are also included by default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Document renovate/ as a default branch prefix.

The default constant also includes renovate, but this section mentions only dependabot/. Update the documentation so the default behavior is complete.

Proposed fix
-     - Allowed branch types when conventional_branch is true. AI agent prefixes (``ai/``, ``claude/``, ``codex/``, ``copilot/``, ``cursor/``) and bot prefixes (``dependabot/``) are also included by default.
+     - Allowed branch types when conventional_branch is true. AI agent prefixes (``ai/``, ``claude/``, ``codex/``, ``copilot/``, ``cursor/``) and bot prefixes (``dependabot/``, ``renovate/``) are also included by default.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- ["feature", "bugfix", "hotfix", "release", "chore", "feat", "fix", "build", "ci", "docs", "perf", "refactor", "test", "style"]
- Allowed branch types when conventional_branch is true. AI agent prefixes (``ai/``, ``claude/``, ``codex/``, ``copilot/``, ``cursor/``) and bot prefixes (``dependabot/``) are also included by default.
- ["feature", "bugfix", "hotfix", "release", "chore", "feat", "fix", "build", "ci", "docs", "perf", "refactor", "test", "style"]
- Allowed branch types when conventional_branch is true. AI agent prefixes (``ai/``, ``claude/``, ``codex/``, ``copilot/``, ``cursor/``) and bot prefixes (``dependabot/``, ``renovate/``) are also included by default.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/configuration.rst` around lines 436 - 437, Update the allowed branch
types documentation near the conventional_branch description to include the
renovate/ bot prefix alongside dependabot/, matching the default branch-prefix
behavior.

@sahilsaiyed-oss
sahilsaiyed-oss deleted the allow-default-branch-types branch July 31, 2026 18:06
@codspeed-hq

codspeed-hq Bot commented Jul 31, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 14.86%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 389 untouched benchmarks
⏩ 115 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
test_ai_agent_and_bot_branch_types_in_default 197.7 µs 232.2 µs -14.86%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing sahilsaiyed-oss:allow-default-branch-types (fbc6c90) with main (91c4a9f)

Open in CodSpeed

Footnotes

  1. 115 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation tests Add test related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant