Commit c484481
enhance(workflow): Add pre-commit hook installation check to Step 12 (#1888)
* enhance(workflow): Add pre-commit hook installation check to Step 12 (#1887)
Adds automatic pre-commit hook detection and installation to Step 12 of
DEFAULT_WORKFLOW.md to handle fresh git worktrees where hooks aren't yet
installed.
Changes:
- Detects if .pre-commit-config.yaml exists (project uses pre-commit)
- Checks if hooks are installed using git rev-parse (worktree-compatible)
- Conditionally runs 'pre-commit install' when needed
- Provides clear diagnostic output for troubleshooting
This ensures developers can execute Step 12 successfully in fresh worktrees
without manual pre-commit setup.
Fixes #1887
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
* refactor(workflow): Implement PR review feedback for Step 12 enhancement
Addresses review feedback from PR #1888:
1. Reordered checklist: Pre-commit Hook Check now FIRST in Step 12 (better logical flow)
2. Added "(worktree-compatible)" note to hooks detection command for clarity
3. Added security warning about reviewing .pre-commit-config.yaml changes
These changes improve workflow clarity and security awareness without changing functionality.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>1 parent 6dbc055 commit c484481
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
275 | 281 | | |
276 | 282 | | |
277 | 283 | | |
| |||
0 commit comments