# Server Configuration HOST=0.0.0.0 PORT=3000 WEBHOOK_PATH=/webhook WEBHOOK_SECRET= # Command Execution on Webhook Events # Available variables for substitution: # {{repo}} - Repository name (e.g., "my-repo") # {{full_repo}} - Full repository name (e.g., "user/my-repo") # {{branch}} - Branch name (e.g., "main", "feature/new-feature") # {{pusher}} - Username of person who triggered the event # {{event}} - Event type (e.g., "push", "pull_request") # {{commit}} - Latest commit hash (for push events) # {{commit_msg}} - Latest commit message (for push events) # {{pr_number}} - Pull request number (for PR events) # {{pr_action}} - Pull request action (opened, closed, etc.) # {{tag}} - Tag name (for create/delete tag events) # {{issue_number}} - Issue number (for issue events) # {{issue_title}} - Issue title (for issue events) # {{issue_action}} - Issue action (opened, closed, reopened, etc.) # {{issue_body}} - Issue description/body (for issue events) # {{comment_body}} - Comment text (for issue_comment events) # Push Event Commands # Execute command when push event is received WEBHOOK_PUSH_ENABLED=true WEBHOOK_PUSH_COMMAND=echo "Push to {{branch}} by {{pusher}} in {{repo}}" # Example: Run deployment script # WEBHOOK_PUSH_COMMAND=/path/to/deploy.sh {{branch}} {{repo}} {{pusher}} # Example: Only deploy main branch # WEBHOOK_PUSH_FILTER_BRANCH=main # WEBHOOK_PUSH_COMMAND=/path/to/deploy-production.sh # Pull Request Event Commands WEBHOOK_PULL_REQUEST_ENABLED=false WEBHOOK_PULL_REQUEST_COMMAND=echo "PR #{{pr_number}} {{pr_action}} by {{pusher}}" # Create Event Commands (new branch or tag) WEBHOOK_CREATE_ENABLED=false WEBHOOK_CREATE_COMMAND=echo "Created {{ref_type}} {{branch}} in {{repo}}" # Delete Event Commands WEBHOOK_DELETE_ENABLED=false WEBHOOK_DELETE_COMMAND=echo "Deleted {{ref_type}} {{branch}} from {{repo}}" # Release Event Commands WEBHOOK_RELEASE_ENABLED=false WEBHOOK_RELEASE_COMMAND=echo "Release {{tag}} {{pr_action}} in {{repo}}" # Issues Event Commands (ticket/bug created, closed, reopened) WEBHOOK_ISSUES_ENABLED=false WEBHOOK_ISSUES_COMMAND=echo "Issue #{{issue_number}} {{issue_action}} by {{pusher}} in {{repo}}: {{issue_title}}" # Example: Send notification when issue is opened # WEBHOOK_ISSUES_COMMAND=/path/to/notify-team.sh "{{issue_title}}" "{{issue_number}}" "{{pusher}}" # Example: Auto-label or assign issues # WEBHOOK_ISSUES_COMMAND=/path/to/triage-issue.sh {{repo}} {{issue_number}} "{{issue_body}}" # Issue Comment Event Commands WEBHOOK_ISSUE_COMMENT_ENABLED=false WEBHOOK_ISSUE_COMMENT_COMMAND=echo "Comment on issue #{{issue_number}} by {{pusher}}: {{comment_body}}" # Example: Trigger CI on specific comment commands # WEBHOOK_ISSUE_COMMENT_COMMAND=/path/to/check-comment-commands.sh "{{comment_body}}" {{issue_number}} # Global Command (runs for ALL events) WEBHOOK_GLOBAL_ENABLED=false WEBHOOK_GLOBAL_COMMAND=echo "Webhook {{event}} received for {{repo}}" # Command Execution Settings COMMAND_TIMEOUT=300000 COMMAND_WORKING_DIR=/workspace