Files
davila7__claude-code-templates/cli-tool/components/hooks/git/prevent-direct-push.json
Dani 92fdaa1f87 feat: add Python scripts for all Git Flow hooks
- Created conventional-commits.py for commit message validation
- Created prevent-direct-push.py for protected branch enforcement
- Updated all hook JSONs to use Python scripts with proper JSON output
- All hooks now use permissionDecision: "deny" for proper blocking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 20:02:20 -04:00

17 lines
553 B
JSON

{
"description": "Prevent direct pushes to protected branches (main, develop). Blocks git push commands targeting main or develop branches to enforce Git Flow workflow. Requires using feature/release/hotfix branches and pull requests instead of direct commits to protected branches.",
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/prevent-direct-push.py"
}
]
}
]
}
}