Skip to content

refactor(pr): check titles and commits with commitizen - #8066

Merged
dan-petty merged 1 commit into
mainfrom
refactor/8045-commitizen-validation
Dec 1, 2026
Merged

dan-petty merged 1 commit into
mainfrom
refactor/8045-commitizen-validation

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Replace the custom checks of commit messages and pull request titles with commitizen, and delete the custom rules.

  • [tool.commitizen] and the hooks commitizen (commit-msg) and commitizen-branch (pre-push) check each commit message. The job Semantic PR title runs cz check on the title in place of amannn/action-semantic-pull-request. The first line has at most 72 characters. cz check ignores that key of the config, so each call passes --message-length-limit 72.
  • A title takes any scope or none, the commitizen types and a !. The scope list, the 60-character summary limit and the rules for placeholders and repeated words are gone.
  • devops pr create, the open step and the merge readiness check no longer judge the structure of a delivery body. A plan body keeps its form rules (refactor(roadmap): plan from a neutral prompt and openspec #8039). The guard against a closing keyword in text that a model writes stays in build_body.
  • The release check also refuses a title type that release-please does not list, when the change has runtime code.
  • Generated titles and commit messages stay within 72 characters. The pull request template is short.

Why: each custom rule broke on valid titles and on other repositories. commitizen is a maintained open tool, and it gives one rule for the hooks and for CI.

The library check PR title / Semantic PR title still enforces the old scope list and 60 characters until dan-petty/github-workflows#70 lands. The ruleset of main does not require it.

Closes #8045

@dan-petty dan-petty added type/refactor Type refactor: a new structure, same behavior scope/pr The devops pr commands labels Dec 1, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Checks run on the rebased branch:

  • Full test suite: 28,826 passed, 7 failed. Six of the seven pass in a clean environment: they read variables that the agent environment sets. The seventh was the snapshot of the MCP tool listing, which holds the new help text of pr describe --summary. This branch updates it (one line).
  • The hooks of the commit and of the push passed, including commitizen, commitizen-branch and openspec-gate. The OpenSpec check alone takes about 2.5 minutes on a busy host (fix(ci): the openspec commit hook times out on a busy host #7928), so the hook passed only after the host restarted and was quiet.

What the rules look like now (owner decision, #8045): any scope; the commitizen types; ! and BREAKING CHANGE allowed; the first line has at most 72 characters; no structure check of a delivery body. The last 200 merged titles all pass: the longest has 72 characters.

Follow-ups, not in this pull request:

Add commitizen 4.20.1 with [tool.commitizen] and the upstream hooks
commitizen (commit-msg) and commitizen-branch (pre-push). The job
Semantic PR title runs cz check in place of the amannn action. The
first line has at most 72 characters.

Delete the custom title rules and the structure rules of a delivery
body. Any scope and a breaking change mark are now allowed. The release
check still refuses a type that ships no release when runtime code
changes. Generated titles and commit messages fit 72 characters.

Refs #8045
@dan-petty
dan-petty force-pushed the refactor/8045-commitizen-validation branch from 081946d to ca4cdcf Compare December 1, 2026 20:38
@dan-petty
dan-petty marked this pull request as ready for review December 1, 2026 20:50
@dan-petty
dan-petty merged commit 4a5a964 into main Dec 1, 2026
39 checks passed
@dan-petty
dan-petty deleted the refactor/8045-commitizen-validation branch December 1, 2026 22:14
dan-petty-release Bot added a commit that referenced this pull request Dec 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.270.4](v0.270.3...v0.270.4)
(2026-12-01)


### Bug Fixes

* **ci:** stop checking skills against the OpenSpec version
([#8069](#8069))
([5b4ac50](5b4ac50))
* **roadmap:** reap the orphans that fill the pod process limit
([#8059](#8059))
([dda7c5d](dda7c5d))


### Code Refactoring

* **pr:** check titles and commits with commitizen
([#8066](#8066))
([4a5a964](4a5a964)),
closes [#8045](#8045)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/pr The devops pr commands type/refactor Type refactor: a new structure, same behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(ci): check commit and PR titles with commitizen

1 participant