21 lines
693 B
JSON
21 lines
693 B
JSON
{
|
|
"hooks": {
|
|
"SessionStart": [
|
|
{ "hooks": [{ "type": "command", "command": "beans prime" }] }
|
|
],
|
|
"PreCompact": [
|
|
{ "hooks": [{ "type": "command", "command": "beans prime" }] }
|
|
],
|
|
"PreToolCall": [
|
|
{
|
|
"matcher": "Bash",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "bash -c 'if echo \"$TOOL_INPUT\" | grep -q \"git commit\"; then BRANCH=$(git branch --show-current); if [ \"$BRANCH\" = \"develop\" ] || [ \"$BRANCH\" = \"main\" ]; then echo \"BLOCK: Cannot commit directly to $BRANCH. Create a feature branch first: git checkout -b feature/<name>\"; exit 2; fi; fi'"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
} |