Skip to content

feat: add commit message normalizer#82

Open
marcus wants to merge 1 commit intomainfrom
commit-normalize
Open

feat: add commit message normalizer#82
marcus wants to merge 1 commit intomainfrom
commit-normalize

Conversation

@marcus
Copy link
Copy Markdown
Owner

@marcus marcus commented Mar 27, 2026

Summary

  • Go library (internal/git/commitmsg.go) for parsing, validating, and normalizing conventional commit messages
  • Bash commit-msg git hook (scripts/commit-msg.sh) auto-fixes minor issues (trailing periods, casing, trailer key casing) and rejects invalid messages
  • Updated Makefile install-hooks target to install both pre-commit and commit-msg hooks

Test plan

  • go test ./internal/git/... passes (table-driven tests for parse, normalize, validate, round-trip, format)
  • go build ./internal/git/... and go vet ./internal/git/... clean
  • Manual: make install-hooks then test with valid/invalid commit messages

🤖 Generated with Claude Code


Automated by nightshift

Go library (internal/git/commitmsg.go) parses, validates, and normalizes
conventional commit messages. Bash commit-msg hook auto-fixes minor issues
(trailing periods, casing) and rejects invalid messages. Makefile
install-hooks target updated to install both hooks.

Nightshift-Task: commit-normalize
Nightshift-Ref: https://github.com/marcus/nightshift
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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