Conversation
- Add .githooks/commit-msg: validates ZIR-XXX: format, exempts Merge/Revert - Add .githooks/prepare-commit-msg: auto-prepends ZIR-000: when prefix missing - Add scripts/setup-hooks.sh: one-command setup via core.hooksPath - Add CONTRIBUTING.md documenting the commit format and hook setup Nightshift-Task: commit-normalize Nightshift-Ref: https://github.com/marcus/nightshift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.githooks/commit-msg(mode 100755): validatesZIR-XXX: Descriptionformat; exempts Merge and Revert commits.githooks/prepare-commit-msg(mode 100755): auto-prependsZIR-000:when prefix is missing, skips merge/squash sourcesscripts/setup-hooks.sh: one-command activation viagit config core.hooksPath .githooksCONTRIBUTING.md: documents the commit format convention and hook setup stepsChanges from previous iteration
-v first_line=argument fromprepare-commit-msg; awk identifies the first matching line via!donewithout needing it passed in.githooks/exists; no duplicatehooks/directory with non-executable copiesscripts/setup-hooks.shusingcore.hooksPath; no conflictingsetup-git-hooks.shTest plan
./scripts/setup-hooks.sh— should print confirmation, no errorsZIR-123: Some change— hook accepts itSome change—prepare-commit-msgprependsZIR-000: Some change;commit-msgaccepts the normalized formBad messagewithout running prepare hook —commit-msgrejects with clear error.githooks/commit-msgand.githooks/prepare-commit-msgare mode 100755 in git:git ls-files --stage .githooks/🤖 Generated with Claude Code