fix: correct hooks.json structure per Claude Code documentation
Three plugins had incorrect hooks.json structure that caused hooks to fail: - pr-review: SessionStart used nested `hooks` array without matcher - cmdb-assistant: SessionStart used nested `hooks` array without matcher - git-flow: Used completely wrong format (array with `event` field) Per Claude Code documentation: - Without matcher: direct `type`/`command` in the event array - With matcher: nested `hooks` array inside matcher object Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,12 +2,8 @@
|
|||||||
"hooks": {
|
"hooks": {
|
||||||
"SessionStart": [
|
"SessionStart": [
|
||||||
{
|
{
|
||||||
"hooks": [
|
"type": "command",
|
||||||
{
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh"
|
||||||
"type": "command",
|
|
||||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"PreToolUse": [
|
"PreToolUse": [
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
{
|
{
|
||||||
"hooks": [
|
"hooks": {
|
||||||
{
|
"PreToolUse": [
|
||||||
"event": "PreToolUse",
|
{
|
||||||
"matcher": "Bash",
|
"matcher": "Bash",
|
||||||
"type": "command",
|
"hooks": [
|
||||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/branch-check.sh"
|
{
|
||||||
},
|
"type": "command",
|
||||||
{
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/branch-check.sh"
|
||||||
"event": "PreToolUse",
|
},
|
||||||
"matcher": "Bash",
|
{
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/commit-msg-check.sh"
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/commit-msg-check.sh"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,8 @@
|
|||||||
"hooks": {
|
"hooks": {
|
||||||
"SessionStart": [
|
"SessionStart": [
|
||||||
{
|
{
|
||||||
"hooks": [
|
"type": "command",
|
||||||
{
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh"
|
||||||
"type": "command",
|
|
||||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user