| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- {
- "$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}}, {{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
- }
- ],
- "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 Code (requires handle-issue.sh script)",
- "type": "shell",
- "command": "/home/claude/agent-manager/scripts/handle-issue.sh",
- "args": ["{{repo_owner}}", "{{repo}}", "{{pusher}}", "{{issue_number}}", "{{issue_title}}", "{{issue_body}}", "{{issue_action}}", "", "{{issue_assignee}}"],
- "cwd": "~",
- "timeout": 600000,
- "filterBranch": null
- },
- {
- "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 (requires handle-issue.sh script)",
- "type": "shell",
- "command": "/home/claude/agent-manager/scripts/handle-issue.sh",
- "args": ["{{repo_owner}}", "{{repo}}", "{{pusher}}", "{{issue_number}}", "{{issue_title}}", "{{issue_body}}", "{{issue_action}}", "{{comment_body}}", "{{issue_assignee}}"],
- "cwd": "~",
- "timeout": 600000,
- "filterBranch": null
- },
- {
- "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
- }
- ]
- }
- }
|