Skip to content

Allow docs/, ci/, test/, refactor/ branches by default #494

Description

@shenxianpeng

Our default commit types include build, ci, docs, perf, refactor, style, test, but the default branch types don't. So a branch like docs/update-readme or ci/fix-workflow fails the Conventional Branch check out of the box, even though docs: / ci: commits are allowed. That inconsistency is surprising.

Where

DEFAULT_BRANCH_TYPES in commit_check/__init__.py (used as the default for allow_branch_types).

What to change

  • Add build, ci, docs, perf, refactor, test (and optionally style) to DEFAULT_BRANCH_TYPES so branch types match commit types.
  • Update the configuration docs if they list the defaults.
  • Add/adjust a test asserting docs/foo and ci/foo pass with the default config.

Acceptance criteria

  • docs/..., ci/..., test/..., refactor/... branches pass by default.
  • Existing branch tests still pass.

Note

This change is purely additive — it only makes more branch names pass; nothing that passed before will start failing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions