Skip to content

feat: allow docs, ci, test, refactor branches by default - #505

Merged
shenxianpeng merged 2 commits into
commit-check:mainfrom
sahilsaiyed-oss:feat/allow-default-branch-types
Aug 1, 2026
Merged

feat: allow docs, ci, test, refactor branches by default#505
shenxianpeng merged 2 commits into
commit-check:mainfrom
sahilsaiyed-oss:feat/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 style
  • Added test

Summary by CodeRabbit

  • New Features

    • Added support for additional conventional branch types: build, ci, docs, perf, refactor, style, and test.
    • Branches using these prefixes are now accepted by default.
  • Documentation

    • Updated configuration examples and reference tables to reflect the expanded default branch types.
  • Tests

    • Added validation coverage for branches using the newly supported prefixes.

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

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploy Preview for commit-check ready!

Name Link
🔨 Latest commit bf7c60d
🔍 Latest deploy log https://app.netlify.com/projects/commit-check/deploys/6a6e5a29a8136300080621e1
😎 Deploy Preview https://deploy-preview-505--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.

@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request tests Add test related changes labels Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f91a27bc-3b03-4ac7-9a17-936b8ee26644

📥 Commits

Reviewing files that changed from the base of the PR and between c93e730 and bf7c60d.

📒 Files selected for processing (4)
  • README.md
  • commit_check/__init__.py
  • docs/configuration.rst
  • tests/rule_builder_test.py
🚧 Files skipped from review as they are similar to previous changes (4)
  • README.md
  • commit_check/init.py
  • tests/rule_builder_test.py
  • docs/configuration.rst

📝 Walkthrough

Walkthrough

The default allowed branch types now include seven additional conventional prefixes. The README and configuration documentation show the expanded list. Tests verify the new defaults and valid branch names.

Changes

Default branch type expansion

Layer / File(s) Summary
Expand default branch type set
commit_check/__init__.py
DEFAULT_BRANCH_TYPES now includes build, ci, docs, perf, refactor, style, and test.
Update validation coverage and configuration examples
tests/rule_builder_test.py, README.md, docs/configuration.rst
Tests cover the added prefixes and valid branch names. Documentation lists the expanded defaults.

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

Possibly related issues

Possibly related PRs

Suggested labels: minor

🚥 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 several branch types added by the pull request and reflects the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.36%. Comparing base (102cc45) to head (bf7c60d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #505   +/-   ##
=======================================
  Coverage   97.36%   97.36%           
=======================================
  Files          12       12           
  Lines        1175     1175           
=======================================
  Hits         1144     1144           
  Misses         31       31           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq

codspeed-hq Bot commented Jul 31, 2026

Copy link
Copy Markdown

Merging this PR will regress 1 benchmark

⚠️ 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 improved benchmark
❌ 1 regressed benchmark
✅ 391 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 196.7 µs 232.2 µs -15.31%
test_empty_message_passes 1,171 µs 748 µs +56.55%

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:feat/allow-default-branch-types (c93e730) with main (d534a3f)2

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.

  2. No successful run was found on main (102cc45) during the generation of this report, so d534a3f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@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 documented default branch-type list in the
configuration section to match DEFAULT_BRANCH_TYPES, adding ai, claude, codex,
copilot, cursor, dependabot, and renovate; keep the statement that these
prefixes are included by default accurate.
🪄 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: 7b79d873-3523-4050-9c77-0f06f5e86fd6

📥 Commits

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

📒 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

Synchronize the documented default with DEFAULT_BRANCH_TYPES.

commit_check/__init__.py also includes ai, claude, codex, copilot, cursor, dependabot, and renovate. The default list at Line 436 omits these values, although Line 437 says they are included by default. Add the missing prefixes or label this row as a partial example.

🤖 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 documented default
branch-type list in the configuration section to match DEFAULT_BRANCH_TYPES,
adding ai, claude, codex, copilot, cursor, dependabot, and renovate; keep the
statement that these prefixes are included by default accurate.

@shenxianpeng shenxianpeng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR!

@shenxianpeng
shenxianpeng force-pushed the feat/allow-default-branch-types branch from c93e730 to bf7c60d Compare August 1, 2026 20:42
@sonarqubecloud

sonarqubecloud Bot commented Aug 1, 2026

Copy link
Copy Markdown

@shenxianpeng shenxianpeng removed documentation Improvements or additions to documentation tests Add test related changes labels Aug 1, 2026
@shenxianpeng
shenxianpeng merged commit 0ce5695 into commit-check:main Aug 1, 2026
29 checks passed
shenxianpeng added a commit that referenced this pull request Aug 1, 2026
…509)

Addresses the review comment on #505: the options table now lists the full
default (all 21 types including AI agent and bot prefixes) and the docs
explicitly note that DEFAULT_BRANCH_TYPES is a superset of the Conventional
Branch spec, with strict spec-only validation available via an explicit
allow_branch_types setting.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants