Shared Git hooks for repositories that use Conventional Commit messages and Kanbus artifact safeguards.
hooks/commit-msg: Enforces semantic-release / Conventional Commits subject format.hooks/pre-push: Blocks push whenproject/issuesorproject/eventsfiles are modified but uncommitted.
Accepted subject format:
<type>(optional-scope)!: <description>
Allowed types:
buildchorecidocsfeatfixperfrefactorrevertstyletest
Examples:
feat(evaluations): add confusion-matrix exportfix(tests): align feedback upsert expectationschore(hooks): harden pre-push path fallback
Also allowed:
Merge ...Revert "..."fixup! .../squash! ...
From the target repository:
git submodule add <git-hooks-repo-url> .shared-hooks
git config core.hooksPath .shared-hooks/hooksVerify:
git config --get core.hooksPath
# expected: .shared-hooks/hooksThis repo includes a helper script:
.shared-hooks/scripts/install-hooks.shOr run from this repo:
./scripts/install-hooks.sh /path/to/target-repoThis sets:
core.hooksPath=.shared-hooks/hooks
In each consuming repository:
git submodule update --remote --merge .shared-hooks
git add .shared-hooks
git commit -m "chore(hooks): update shared git hooks"- Hooks run locally and can be bypassed with
--no-verify. - If
rgis unavailable in hook PATH,pre-pushautomatically falls back togrep -E. - Add CI checks for defense in depth; hooks should not be your only enforcement layer.