Repository navigation
Conversation
- .githooks/commit-msg: rejects commits missing ZIR-NNN: <description> - .githooks/prepare-commit-msg: auto-prepends ZIR-000: when prefix absent, skips merge/squash/template sources to avoid garbling pre-populated messages - scripts/setup-hooks.sh: one-command setup via git config core.hooksPath - .github/workflows/commit-lint.yml: CI enforcement with identical pattern - CONTRIBUTING.md: documents format and setup steps 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-msgthat rejects commits whose subject line does not matchZIR-NNN: <non-empty description>(Merge/Revert commits are exempt).githooks/prepare-commit-msgthat auto-prependsZIR-000:when the prefix is absent; skipsmerge,squash, andtemplatecommit sources so pre-populated messages are never garbledscripts/setup-hooks.shfor one-command developer opt-in (git config core.hooksPath .githooks).github/workflows/commit-lint.ymlthat enforces the same pattern as the local hook on every PR —^ZIR-[0-9]+: .+— so CI catches any missesCONTRIBUTING.mddocumenting the format and setup stepsDesign decisions
.githooks/+core.hooksPath). No duplicatehooks/directory or second setup script.prepare-commit-msgskips thetemplateCOMMIT_SOURCE to avoid prependingZIR-000:onto aZIR-XXX:template placeholder.awk.Test plan
bash scripts/setup-hooks.shin a clone; verifygit config core.hooksPathreturns.githooksgit commit -m "no prefix"— should be rejected bycommit-msghookgit commit -m "ZIR-123: valid"— should succeedgit commit -m "ZIR-123: "(empty description) — should be rejectedMerge branch foois acceptedNightshift-Task: commit-normalize
Nightshift-Ref: https://github.com/marcus/nightshift