Skip to content

ZIR-000: Track commit message hooks and document commit format - #356

Open
zeroecco wants to merge 1 commit into
mainfrom
feature/commit-normalize-v3
Open

zeroecco wants to merge 1 commit into
mainfrom
feature/commit-normalize-v3

Conversation

@zeroecco

Copy link
Copy Markdown

Summary

  • Adds .githooks/commit-msg (validates ZIR-XXX: format, exempts Merge/Revert commits)
  • Adds .githooks/prepare-commit-msg (auto-prepends ZIR-000: when prefix is missing; guards awk result before overwriting commit file)
  • Adds scripts/setup-hooks.sh (one-command setup via git config core.hooksPath)
  • Adds CONTRIBUTING.md documenting the convention and setup steps

Both hook files are tracked as mode 100755 (executable). No duplicate hooks/ directory. No conflicting setup scripts. No unreferenced template files.

Test plan

  • Run bash scripts/setup-hooks.sh and verify git config core.hooksPath is set to .githooks
  • Attempt a commit with a non-conforming message — confirm commit-msg hook rejects it
  • Attempt a merge commit — confirm it is allowed through
  • Attempt a commit without a ZIR prefix — confirm prepare-commit-msg prepends ZIR-000:
  • Verify .githooks/commit-msg and .githooks/prepare-commit-msg are mode 100755 in git ls-files --stage

🤖 Generated with Claude Code

Adds .githooks/commit-msg and .githooks/prepare-commit-msg so the
ZIR-XXX: commit format convention is enforced for all contributors
without manual hook installation. scripts/setup-hooks.sh activates
the hooks via `git config core.hooksPath`. CONTRIBUTING.md documents
the format and setup steps.

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