{ "$schema": "https://json-schema.org/draft-07/schema#", "description": "Command configuration for webhook events. Available variables: {{repo}}, {{full_repo}}, {{repo_owner}}, {{branch}}, {{pusher}}, {{event}}, {{commit}}, {{commit_msg}}, {{pr_number}}, {{pr_action}}, {{tag}}, {{ref_type}}, {{issue_number}}, {{issue_title}}, {{issue_action}}, {{issue_body}}, {{issue_assignee}}, {{issue_labels}}, {{comment_body}}", "commands": { "push": [ { "name": "echo-push-event", "description": "Simple echo command for push events", "type": "shell", "command": "echo", "args": ["Push to {{branch}} by {{pusher}} in {{repo}}"], "cwd": null, "timeout": 300000, "filterBranch": null }, { "name": "deploy-production", "description": "Deploy to production on main branch", "type": "shell", "command": "/path/to/deploy.sh", "args": ["{{branch}}", "{{repo}}", "{{pusher}}"], "cwd": "/workspace", "timeout": 600000, "filterBranch": "main" } ], "pull_request": [ { "name": "pr-notification", "description": "Notify team about pull requests", "type": "shell", "command": "echo", "args": ["PR #{{pr_number}} {{pr_action}} by {{pusher}}"], "cwd": null, "timeout": 300000, "filterBranch": null }, { "name": "pr-ci-trigger", "description": "Trigger CI only for opened or synchronized PRs", "type": "shell", "command": "/path/to/trigger-ci.sh", "args": ["{{repo}}", "{{pr_number}}"], "cwd": null, "timeout": 300000, "filterBranch": null, "filterActions": ["opened", "synchronize"] } ], "create": [ { "name": "branch-created", "description": "Handle new branch or tag creation", "type": "shell", "command": "echo", "args": ["Created {{ref_type}} {{branch}} in {{repo}}"], "cwd": null, "timeout": 300000, "filterBranch": null } ], "delete": [ { "name": "branch-deleted", "description": "Handle branch or tag deletion", "type": "shell", "command": "echo", "args": ["Deleted {{ref_type}} {{branch}} from {{repo}}"], "cwd": null, "timeout": 300000, "filterBranch": null } ], "release": [ { "name": "release-notification", "description": "Handle release events", "type": "shell", "command": "echo", "args": ["Release {{tag}} {{pr_action}} in {{repo}}"], "cwd": null, "timeout": 300000, "filterBranch": null } ], "issues": [ { "name": "issue-notification", "description": "Notify team about issues", "type": "shell", "command": "echo", "args": ["Issue #{{issue_number}} {{issue_action}} by {{pusher}} in {{repo}}: {{issue_title}}"], "cwd": null, "timeout": 300000, "filterBranch": null }, { "name": "claude-issue-handler", "description": "Automatically handle issues assigned to Claude with Claude Agent SDK TypeScript client", "type": "node", "command": "/data/agent-manager/client/dist/index.js", "args": ["{{repo_owner}}", "{{repo}}", "{{pusher}}", "{{issue_number}}", "{{issue_title}}", "{{issue_body}}", "{{issue_action}}", "", "{{issue_assignee}}"], "cwd": null, "timeout": 600000, "filterBranch": null, "filterActions": ["assigned", "opened", "reopened"], "filterAssignee": "claude" }, { "name": "triage-issue", "description": "Auto-triage issues with a script", "type": "shell", "command": "/path/to/triage-issue.sh", "args": ["{{repo}}", "{{issue_number}}", "{{issue_body}}"], "cwd": null, "timeout": 300000, "filterBranch": null }, { "name": "process-issue-with-node", "description": "Process issue with Node.js script", "type": "node", "command": "./scripts/process-issue.js", "args": ["--repo", "{{repo}}", "--issue", "{{issue_number}}", "--action", "{{issue_action}}"], "cwd": null, "timeout": 300000, "filterBranch": null } ], "issue_comment": [ { "name": "comment-notification", "description": "Handle issue comments", "type": "shell", "command": "echo", "args": ["Comment on issue #{{issue_number}} by {{pusher}}: {{comment_body}}"], "cwd": null, "timeout": 300000, "filterBranch": null }, { "name": "claude-comment-handler", "description": "Automatically handle issue comments for issues assigned to Claude with Claude Agent SDK TypeScript client", "type": "node", "command": "/data/agent-manager/client/dist/index.js", "args": ["{{repo_owner}}", "{{repo}}", "{{pusher}}", "{{issue_number}}", "{{issue_title}}", "{{issue_body}}", "{{issue_action}}", "{{comment_body}}", "{{issue_assignee}}"], "cwd": null, "timeout": 600000, "filterBranch": null, "filterActions": ["created"], "filterAssignee": "claude" }, { "name": "check-comment-commands", "description": "Check for special commands in comments", "type": "shell", "command": "/path/to/check-comment-commands.sh", "args": ["{{comment_body}}", "{{issue_number}}"], "cwd": null, "timeout": 300000, "filterBranch": null } ], "global": [ { "name": "log-all-events", "description": "Log all webhook events (runs for every event)", "type": "shell", "command": "echo", "args": ["Webhook {{event}} received for {{repo}}"], "cwd": null, "timeout": 300000, "filterBranch": null } ] } }