Repository navigation
Description
Problem
Custom code and several separate lists define the form of a commit message and of a pull request title. No hook checks a commit message.
Evidence (2026-12-01)
src/devops_cli/roadmap/commit_title.pyparses the Conventional Commit form, and about 19 modules import it. Its docstring says that no maintained Python package parses the form.title_problemsofsrc/devops_cli/roadmap/pull_form.pychecks the type, the scope, the!mark and the summary fordevops pr create,devops pr editand the roadmap jobs.- The types are in
CONST_BRANCH_TYPES, in the branch name pattern of.pre-commit-config.yamland inrelease-please-config.json. .github/workflows/pr-checks.yml(amannn/action-semantic-pull-request) and.github/workflows/pr-title.yml(the template workflow) each check the title with a scope list of their own.
Existing tool
commitizen (MIT, release 4.20.1 on 2026-12-01) publishes the pre-commit hooks commitizen (commit-msg) and commitizen-branch (pre-push). cz check reads a message (--message), a file or a revision range, and --message-length-limit limits the first line. A cz_customize configuration sets a pattern of its own. Its documents say that cz_customize can change in the next major release, so check the supported way before the build.
Acceptance criteria
- One commitizen configuration holds the allowed types and scopes.
.pre-commit-config.yamlruns the hookscommitizenandcommitizen-branch, and onepre-commit installinstalls thecommit-msghook.- One CI check reads the pull request title with
cz checkand the same configuration. The other title check and its scope list are deleted. - The change deletes the custom title form rules and the custom commit parsing, with their tests, messages and specs. Code that only formats or checks a title uses commitizen or relies on the hooks and CI.
- The pull request lists each rule that commitizen cannot express, such as the closing keyword guard, and keeps or drops it with a reason.
- commitizen only checks messages. release-please stays the release tool.
- The summary limit does not become weaker.
Related
- feat(ci): add git hygiene hooks to the repository template github-workflows#70 adds the same hooks to the repository template.
- refactor(roadmap): check job work with repository hooks only #8040 makes the repository hooks the checks of the jobs, so these hooks check the commits of the agent.
- ci: define each check in pre-commit and make targets #8041 moves the other checks to pre-commit and make targets.
Proposed design
Problem statement
Custom code and three lists define the form of a commit message and of a pull request title. No hook checks a commit message. commitizen checks a message with one configuration and two hooks. This change deletes the custom form code and uses commitizen for the commit message and for the pull request title. release-please stays the release tool.
Acceptance criteria
Requirement: The commitizen configuration accepts the default types and any scope
The repository SHALL hold one commitizen configuration that sets the cz_conventional_commits types and accepts any scope.
Scenario: A default type with any scope passes
- WHEN
uv run cz check --message "feat(any-scope): add the commitizen check"runs - THEN the command exits 0 and prints no error.
Requirement: A type outside the commitizen defaults fails
The commitizen configuration MUST refuse a type that cz_conventional_commits does not list.
Scenario: An unlisted type fails
- WHEN
uv run cz check --message "nope(any-scope): add the commitizen check"runs - THEN the command exits non-zero and prints the commitizen refusal of the type.
Requirement: A breaking change mark passes
The commitizen configuration MUST accept a ! before the colon.
Scenario: A title with a ! passes
- WHEN
uv run cz check --message "feat!: drop the custom title check"runs - THEN the command exits 0 and prints no error.
Requirement: The first line of a commit message has at most 72 characters
The repository MUST refuse a commit message whose first line has more than 72 characters.
Scenario: A long first line fails
- WHEN
uv run cz check --message "feat: add the commitizen check to the commit message and the pull request title of this repository" --message-length-limit 72runs - THEN the command exits non-zero and prints the commitizen length refusal.
Requirement: The commitizen hooks run on commit-msg and pre-push
The repository SHALL run the commitizen hooks commitizen on commit-msg and commitizen-branch on pre-push from .pre-commit-config.yaml.
Scenario: A bad commit message is refused
- WHEN
pre-commit validate-configandpre-commit install-hookspass, andpre-commit run commitizen --hook-stage commit-msg --files <a file that holds "nope: add the check">runs - THEN the run exits non-zero and prints the commitizen refusal.
Requirement: One pre-commit install installs the commit-msg hook
The repository MUST install the commit-msg hook from one pre-commit install.
Scenario: A commit with a bad message is refused
- WHEN
pre-commit installruns in a fresh clone andgit commit -m "nope: add the check"runs - THEN git refuses the commit and prints the commitizen refusal.
Requirement: The repository holds one pull request title check
The repository SHALL check a pull request title with cz check and the commitizen configuration, and SHALL hold no second title check.
Scenario: The workflow set passes actionlint and zizmor
- WHEN
uv run devops ci --check --only actionlint,zizmorruns - THEN the command exits 0 and reports no error in the workflows of
.github/workflows/.
Requirement: The custom title form rules are deleted
The repository SHALL delete the custom title form rules of src/devops_cli/roadmap/pull_form.py with their tests, messages and spec requirements.
Scenario: The module holds no title form rule
- WHEN
uv run python -c "from devops_cli.roadmap.pull_form import title_problems, build_title"runs - THEN the command exits non-zero with
ImportError.
Requirement: The custom pull request body form rules are deleted
The repository SHALL delete the custom form rules for a pull request body from src/devops_cli/roadmap/pull_form.py with their tests, messages and spec requirements.
Scenario: The module holds no body form rule
- WHEN
uv run python -c "from devops_cli.roadmap.pull_form import body_problems, plan_body_problems"runs - THEN the command exits non-zero with
ImportError.
Requirement: The remaining title paths rely on the hooks and the CI check
The repository SHALL pass its tests with no caller of title_problems or build_title.
Scenario: The roadmap and command tests pass
- WHEN
uv run pytest tests/roadmap tests/commands -qruns - THEN the command exits 0 and reports no failed test.
Requirement: Pending a person after the merge
A person MUST prove after the merge that the required check refuses a pull request title that breaks the commitizen form.
Scenario: A bad pull request title fails the required check
- WHEN
dan-petty/github-workflows#70ships thecz checkstep and a pull request intomainhas the titlenope: add the check - THEN the required check
PR title / Semantic PR titlefails and the pull request cannot merge.
Existing Tool Considered
No alternatives check has run. commitizen 4.20.1 (MIT) covers the need: it publishes the hooks commitizen (commit-msg) and commitizen-branch (pre-push), and cz check reads a message with --message, a file or a revision range. It lacks a check of a pull request body and a reader of the type and the scope of a message. A short pull request template guides the body, and the deferred issue keeps the reader of the type until a maintained package parses the form.
Key questions
- Which open, maintained tool checks a commit message and a pull request title?: commitizen 4.20.1 (MIT) is the open, maintained Python tool. It checks a message with
cz check.cz checkreads a message with--message, a file or a revision range, and--message-length-limitlimits the first line. It publishes the hookscommitizen(commit-msg) andcommitizen-branch(pre-push). The repository runs the samecz checkon the pull request title in CI. [sources: https://hub.docker.com/r/commitizen/commitizen, tests/fixtures/roadmap_eval/implement/4782-pr-edit-title/issue.md:17, docs/adr/0012-releases-are-derived-by-release-please-from-trunk-and-milestones-are-planning-buckets.md:372] - Which types and scopes does the commitizen configuration allow?: The
cz_conventional_commitsdefaults: build, chore, ci, docs, feat, fix, perf, refactor, revert, style and test. Any scope is allowed. A!before the colon is allowed. The first line has at most 72 characters. (best practice) [sources: src/devops_cli/config/constants.py:801, .pre-commit-config.yaml, release-please-config.json]- Rejected: Keep the
CONST_BRANCH_TYPESlist. Three lists define the types today, and the owner direction replaces them with the commitizen defaults. - Chosen: The
cz_conventional_commitsdefaults. The owner direction of 2026-12-01 names the defaults, and commitizen checks them with no custom pattern. - Rejected: A
cz_customizepattern. The documents of commitizen say thatcz_customizecan change in the next major release, and the defaults need no custom pattern.
- Rejected: Keep the
- Which workflow checks the pull request title?: The library workflow that
.github/workflows/pr-title.ymlcalls keeps the check namePR title / Semantic PR title. It runscz checkwith the same configuration. The change deletes the title check of.github/workflows/pr-checks.ymland its scope list.dan-petty/github-workflows#70changes the library workflow. (best practice) [sources: .github/workflows/pr-checks.yml, .github/workflows/pr-title.yml]- Rejected: Keep
amannn/action-semantic-pull-requestinpr-checks.yml. It holds a second scope list and a summary pattern of its own, and the owner wants one configuration. - Chosen: The library workflow with
cz check. It keeps the required check name of the ruleset after chore(github): require the library title check on main #7954, and one configuration holds the rules.
- Rejected: Keep
- Does the summary limit become weaker?: Yes. The limit changes from 60 to 72 characters, by the owner direction of 2026-12-01. The owner direction replaces the stricter rule of the issue. The 72 characters match commitizen and the industry default. (best practice) [sources: src/devops_cli/roadmap/pull_form.py]
- Rejected: Keep 60 characters. The owner direction sets 72 and replaces the stricter rule.
- Chosen: 72 characters. The owner direction of 2026-12-01 names 72, and it is the industry default.
- Which rule that commitizen cannot express stays?: None of the body rules stays. commitizen checks a message only. The change drops the
Closesline rule, theChange:line rule, the body length limit, the closing keyword guard, the placeholder rule, the summary repeat rule and the scope list. A short pull request template holds theClosesline. (best practice) [sources: src/devops_cli/roadmap/pull_form.py]- Rejected: Keep the closing keyword guard and the other body rules. The owner direction says that no custom form rule checks the pull request body.
- Chosen: Drop each rule that commitizen cannot express. commitizen checks the message form, and the short template guides the body.
- Does release-please stay the release tool?: Yes. commitizen checks messages only. release-please keeps the release flow (ADR 0013), and the change does not touch the release configuration. (best practice) [sources: docs/adr/0013-releases-use-release-please-as-it-ships-and-agents-stay-out.md, release-please-config.json]
- Rejected: Replace release-please with commitizen. ADR 0013 keeps release-please, and commitizen has no release flow for this repository.
- Chosen: Keep release-please. ADR 0013 keeps release-please as it ships.
Fit
Fits in one pull request.
Suspected block
dan-petty/github-workflows#70 must make the library pr-title workflow run cz check with the same configuration before this repository deletes the check in .github/workflows/pr-checks.yml.
Dependencies
Watched files
A commit on the default branch that changes one of these files starts the next refine round.
.github/workflows/pr-checks.yml
Alternatives check of 2026-12-01: not-applicable.
Class: refactor, no model call.
Tool: none found.
Activity
dan-petty commentedon Dec 1, 2026
Both deal with the two title checks and two scope lists, but #7954 requires the existing check on main while the candidate replaces the whole mechanism with commitizen.dan-petty commentedon Dec 1, 2026
Related work: #7954 moves the ruleset of main to the library check
PR title / Semantic PR title. So keep that check name, change the library workflow in dan-petty/github-workflows (#70 there) to runcz check, and delete the check ofpr-checks.yml. Then no further ruleset change is necessary after #7954. Only a person changes a ruleset.dan-petty commentedon Dec 1, 2026
Owner direction (2026-12-01): match commitizen and the industry defaults, and use best practice where there is a gap. The rules: the default types of
cz_conventional_commits; any scope;!andBREAKING CHANGEallowed; a first line of at most 72 characters; the commitizen hooks for commit messages; no custom form rule for the pull request body, which uses a short pull request template. These rules replace each stricter or different rule in this item. The work is in progress on the branchrefactor/8045-commitizen-validation.devops-cli-service commentedon Dec 1, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
refactor(pr): check titles and commits with commitizen
chore(main): release 0.270.4 (#8074)
devops-cli-service commentedon Dec 1, 2026
Released in v0.270.4: https://github.com/dan-petty/devops-cli/releases/tag/v0.270.4