Skip to content

fix(build): make install-hooks installs the commit-msg normalizer hook - #193

Open
iamlasse wants to merge 2 commits into
marcus:mainfrom
iamlasse:chore/install-commit-msg-hook
Open

fix(build): make install-hooks installs the commit-msg normalizer hook#193
iamlasse wants to merge 2 commits into
marcus:mainfrom
iamlasse:chore/install-commit-msg-hook

Conversation

@iamlasse

@iamlasse iamlasse commented Jul 21, 2026

Copy link
Copy Markdown

Summary

docs/commit-messages.md instructs users to run make install-hooks to install the commit-msg hook, but the install-hooks Makefile target only symlinked scripts/pre-commit.sh — leaving the Conventional Commits normalizer hook (scripts/commit-msg.sh) uninstalled so it never ran on commits.

Changes

  • Extend the install-hooks target to also ln -sf ../../scripts/commit-msg.sh .git/hooks/commit-msg, mirroring the existing pre-commit pattern.
  • Update the help target and the target's comment to describe both hooks.

Verification

  • make install-hooks installs both .git/hooks/pre-commit and .git/hooks/commit-msg, each pointing at the correct script.
  • go build ./... passes.
  • go test ./... passes.
  • The commit for this change was itself normalized by the newly-installed commit-msg hook.

Closes the enforcement gap described in `commit-normalize`.


Automated by nightshift

iamlasse added 2 commits June 28, 2026 02:10
Add internal/commits with pure Normalize/validate functions enforcing the project's Conventional Commits rules (known type set, lowercase type, lowercase subject, 72-char subject limit, whitespace trimming, and 72-column body wrapping). Wire it into the CLI as 'nightshift commit normalize' (positional, --file, and stdin sources; --check to validate only), ship a commit-msg git hook under scripts/, and document the format and installation in docs/commit-messages.md.

Nightshift-Task: commit-normalize
Nightshift-Ref: https://github.com/marcus/nightshift
Extend the install-hooks target to also symlink scripts/commit-msg.sh
into .git/hooks/commit-msg, mirroring the existing pre-commit pattern.
This closes the enforcement gap where docs/commit-messages.md directed
users to run 'make install-hooks' but the target only installed the
pre-commit hook, leaving the Conventional Commits normalizer
uninstalled.

Update the help target to describe both 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