Enforce Conventional Commits via commit-msg hook #70
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol#70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up from #16 (see ADR-0014 "Consequences").
The release pipeline added in #16 generates release notes with
git-cliffconfigured to parse Conventional Commits. Commits that don't match a conventional prefix land in a catch-all "Other" group — which works as a transition period but degrades release-note quality if it becomes the steady state.Today the convention is documented (CLAUDE.md, ADR-0014) but unenforced. Anyone — including future-me — can land a non-conventional commit message and nothing catches it until a release goes out with a half-empty changelog.
Scope
commit-msghook tolefthook.ymlthat rejects commit messages not matching the Conventional Commits grammar (<type>(<optional scope>)!?: <subject>).cliff.tomlparses:feat,fix,perf,refactor,docs,test,build,ci,chore,revert.LEFTHOOK_EXCLUDE=commit-msg git commit ...mirrors the existing gitleaks-skip pattern;--no-verifystays the last-resort.pull_requestCI check (probably a small step in the existingsecrets.ymlor a dedicatedcommit-lint.yml) so a contributor who skipped local hooks still gets caught at PR time. The CI check should scan the PR's commit range only, not the whole branch history.Acceptance criteria
git commit -m "did a thing"is rejected locally with a message pointing at the convention doc.git commit -m "feat(release): wire conventional-commit gate"succeeds.docs/ci.mdupdated to point at the enforcement, not just the convention.lavamoat.allowScriptsfor whatever new dev dep gets pulled in, if any (commitlint pulls a handful).Out of scope
Part of epic #2.