Implements PreToolUse/Bash hook to validate branch naming convention: - Validates type/description format - Allowed types: feat, fix, chore, docs, refactor, test, perf, debug - Enforces lowercase, hyphens, max 50 chars - Non-branch commands pass through Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
372 B
JSON
20 lines
372 B
JSON
{
|
|
"hooks": {
|
|
"PreToolUse": [
|
|
{
|
|
"matcher": "Bash",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/branch-check.sh"
|
|
},
|
|
{
|
|
"type": "command",
|
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/commit-msg-check.sh"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|