git_hooks
Manage Git hooks in local repositories by listing, creating, enabling, or disabling hooks such as pre-commit or post-merge to automate and enforce workflows.
Instructions
Manage git hooks in the repository.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
action | Yes | Hook action (list, get, create, enable, disable) | list |
hook_name | No | Name of the hook (e.g., 'pre-commit', 'post-merge') | |
repo_path | Yes | The path to the local Git repository | |
script | No | Script content for the hook (for create action) |
Input Schema (JSON Schema)
{
"properties": {
"action": {
"default": "list",
"description": "Hook action (list, get, create, enable, disable)",
"enum": [
"list",
"get",
"create",
"enable",
"disable"
],
"type": "string"
},
"hook_name": {
"description": "Name of the hook (e.g., 'pre-commit', 'post-merge')",
"type": "string"
},
"repo_path": {
"description": "The path to the local Git repository",
"type": "string"
},
"script": {
"description": "Script content for the hook (for create action)",
"type": "string"
}
},
"required": [
"repo_path",
"action"
],
"type": "object"
}