Generalize tracked repo hook dispatch #66

Merged
vnprc merged 1 commit from agent/generalize-hookspath into master 2026-06-24 03:56:47 +01:00
Contributor

Summary

  • Replace hardcoded run_cdk_tracked_hook with generic run_tracked_hook that reads a .hookspath file from the repo root to locate version-controlled hooks
  • Fall back to .hooks/ directory as a zero-config convention when no .hookspath exists
  • Pass hook_stdin through to tracked hooks so pre-push hooks work correctly
  • Add 5 new tests covering .hookspath lookup, .hooks/ fallback, and no-hooks-present cases

Closes #60

Test plan

  • All 15 tests pass (10 existing + 5 new)
  • Add .hookspath containing misc/git-hooks to cdk checkout and verify pre-commit hook runs
## Summary - Replace hardcoded `run_cdk_tracked_hook` with generic `run_tracked_hook` that reads a `.hookspath` file from the repo root to locate version-controlled hooks - Fall back to `.hooks/` directory as a zero-config convention when no `.hookspath` exists - Pass `hook_stdin` through to tracked hooks so pre-push hooks work correctly - Add 5 new tests covering `.hookspath` lookup, `.hooks/` fallback, and no-hooks-present cases Closes #60 ## Test plan - [x] All 15 tests pass (10 existing + 5 new) - [ ] Add `.hookspath` containing `misc/git-hooks` to cdk checkout and verify pre-commit hook runs
Replace the hardcoded run_cdk_tracked_hook with a generic
run_tracked_hook that reads a .hookspath file from the repo root to
locate version-controlled hooks. Falls back to .hooks/ directory as a
zero-config convention. Any repo can now opt in by adding a .hookspath
file pointing to its tracked hooks directory.

Closes #60
vnprc approved these changes 2026-06-24 03:56:32 +01:00
vnprc merged commit d8cc62fc36 into master 2026-06-24 03:56:47 +01:00
vnprc deleted branch agent/generalize-hookspath 2026-06-24 03:56:48 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
allod/tools!66
No description provided.