Skip to content

chore: add commit message normalization#144

Open
marcus wants to merge 1 commit intocodex/lint-fix-linter-fixesfrom
nightshift/commit-normalize-hooks
Open

chore: add commit message normalization#144
marcus wants to merge 1 commit intocodex/lint-fix-linter-fixesfrom
nightshift/commit-normalize-hooks

Conversation

@marcus
Copy link
Copy Markdown
Owner

@marcus marcus commented Apr 29, 2026

Detected convention

Recent history already mixes Conventional Commit subjects such as fix:, feat(tasks):, docs:, and refactor: with older free-form release commits. GoReleaser changelog filters also key off Conventional Commit prefixes for docs:, test:, ci:, and chore:, so this standardizes future commits on that format.

Implementation

  • Added a root .gitmessage template documenting type(scope): description, allowed types, 72-character subjects, body/trailer spacing, and examples.
  • Added executable scripts/commit-msg.sh to validate the first real subject line, allow merge/revert commits, require an allowed Conventional Commit type with optional scope, require a non-empty description, and enforce the 72-character subject limit.
  • Updated make install-hooks to install both pre-commit and commit-msg hooks.
  • Documented the hook behavior and git config commit.template .gitmessage setup in README.

Verification

  • Manual commit-msg hook checks with temporary valid, invalid, merge, and revert message files.
  • make install-hooks
  • go test ./...
  • Commit verified through installed pre-commit and commit-msg hooks.

Nightshift-Task: commit-normalize

Nightshift-Ref: https://github.com/marcus/nightshift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant