Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,22 @@ ai_attribution = "forbid"
[branch]
# https://conventionalbranch.org
conventional_branch = true
allow_branch_types = ["feature", "bugfix", "hotfix", "release", "chore", "feat", "fix"]
```
allow_branch_types = [
"feature",
"bugfix",
"hotfix",
"release",
"chore",
"feat",
"fix",
"build",
"ci",
"docs",
"perf",
"refactor",
"style",
"test",
]```

> [!TIP]
> **IDE Autocompletion**
Expand Down
7 changes: 7 additions & 0 deletions commit_check/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@
"chore",
"feat",
"fix",
"build",
"ci",
"docs",
"perf",
"refactor",
"test",
"style",
# AI agent prefixes (conventional branch spec v1.1.0)
"ai",
"claude",
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Example Configuration
[branch]
# https://conventionalbranch.org
conventional_branch = true
allow_branch_types = ["feature", "bugfix", "hotfix", "release", "chore", "feat", "fix"]
allow_branch_types = ["feature", "bugfix", "hotfix", "release", "chore", "feat", "fix", "build", "ci", "docs", "perf", "refactor", "test", "style"]
# allow_branch_names = [] # Optional - additional standalone branch names (e.g., ["develop", "staging"])
# require_rebase_target = "main" # Optional - no rebase requirement by default
# ignore_authors = [] # Optional - no authors ignored by default
Expand Down Expand Up @@ -433,7 +433,7 @@ Options Table Description
* - branch
- allow_branch_types
- list[str]
- ["feature", "bugfix", "hotfix", "release", "chore", "feat", "fix"]
- ["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.
Comment on lines +436 to 437

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.

* - branch
- allow_branch_names
Expand Down
15 changes: 15 additions & 0 deletions tests/rule_builder_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,13 @@ def test_ai_agent_and_bot_branch_types_in_default(self):
assert "cursor" in DEFAULT_BRANCH_TYPES
assert "dependabot" in DEFAULT_BRANCH_TYPES
assert "renovate" in DEFAULT_BRANCH_TYPES
assert "build" in DEFAULT_BRANCH_TYPES
assert "ci" in DEFAULT_BRANCH_TYPES
assert "docs" in DEFAULT_BRANCH_TYPES
assert "perf" in DEFAULT_BRANCH_TYPES
assert "refactor" in DEFAULT_BRANCH_TYPES
assert "style" in DEFAULT_BRANCH_TYPES
assert "test" in DEFAULT_BRANCH_TYPES

config = {"branch": {"conventional_branch": True}}
builder = RuleBuilder(config)
Expand All @@ -236,6 +243,14 @@ def test_ai_agent_and_bot_branch_types_in_default(self):
assert rule is not None

valid_branches = [
# Conventional branch types matching default commit types
"build/update-ci-image",
"ci/github-actions",
"docs/update-readme",
"perf/optimize-parser",
"refactor/simplify-engine",
"style/format-code",
"test/add-api-tests",
# AI agent branches
"ai/refactor-auth-flow",
"claude/stoic-hypatia-v65p1f",
Expand Down
Loading