Detect external hook managers and warn during enable#373
Conversation
Detect Husky, Lefthook, pre-commit, and Overcommit via filesystem
checks and show actionable warnings after hook installation. Husky
users get copy-paste instructions for durable integration; other
managers get a note to re-run `entire enable` if hooks are overwritten.
Lefthook detection covers all valid config patterns:
{.,}lefthook{,-local}.{yml,yaml,json,toml}
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Entire-Checkpoint: 2939ce7ed7da
PR SummaryLow Risk Overview New Written by Cursor Bugbot for commit bace45e. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
There was a problem hiding this comment.
Pull request overview
Adds filesystem-based detection of common external git hook managers during entire enable, and prints tailored guidance/warnings so users understand when/why Entire’s hooks may be overwritten and how to make integration durable (notably for Husky).
Changes:
- Introduces hook-manager detection (Husky, Lefthook variants, pre-commit, Overcommit) and warning text generation.
- Hooks the warning output into multiple enable/setup flows after hook installation.
- Adds unit tests covering detection, deduping, warning formatting, and RepoRoot-based warning emission.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cmd/entire/cli/strategy/hook_managers.go | Implements detection + warning rendering and exposes CheckAndWarnHookManagers. |
| cmd/entire/cli/strategy/hook_managers_test.go | Adds unit tests for detection and warning content/output. |
| cmd/entire/cli/setup.go | Calls strategy.CheckAndWarnHookManagers after installing hooks in enable/setup flows. |
Detect Husky, Lefthook, pre-commit, and Overcommit via filesystem
checks and show actionable warnings after hook installation. Husky
users get copy-paste instructions for durable integration; other
managers get a note to re-run `entire enable` if hooks are overwritten.
Lefthook detection covers all valid config patterns:
{.,}lefthook{,-local}.{yml,yaml,json,toml}
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Entire-Checkpoint: 2939ce7ed7da
Co-Authored-By: Claude Opus 4.6 <[email protected]> Entire-Checkpoint: 2f0d85913f6e
Co-authored-by: Copilot <[email protected]>
Summary
entire enablevia filesystem checks (no file reads)npm install)entire enableif hooks are overwritten{.,}lefthook{,-local}.{yml,yaml,json,toml})Test plan
mise run fmt && mise run lint && mise run test:cipasses.husky/_/→ warning with 4 hook commands shownlefthook.yml→ note showncloses #228
🤖 Generated with Claude Code