.env.example 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Server Configuration
  2. HOST=0.0.0.0
  3. PORT=3000
  4. WEBHOOK_PATH=/webhook
  5. WEBHOOK_SECRET=
  6. # Command Execution on Webhook Events
  7. # Available variables for substitution:
  8. # {{repo}} - Repository name (e.g., "my-repo")
  9. # {{full_repo}} - Full repository name (e.g., "user/my-repo")
  10. # {{branch}} - Branch name (e.g., "main", "feature/new-feature")
  11. # {{pusher}} - Username of person who triggered the event
  12. # {{event}} - Event type (e.g., "push", "pull_request")
  13. # {{commit}} - Latest commit hash (for push events)
  14. # {{commit_msg}} - Latest commit message (for push events)
  15. # {{pr_number}} - Pull request number (for PR events)
  16. # {{pr_action}} - Pull request action (opened, closed, etc.)
  17. # {{tag}} - Tag name (for create/delete tag events)
  18. # {{issue_number}} - Issue number (for issue events)
  19. # {{issue_title}} - Issue title (for issue events)
  20. # {{issue_action}} - Issue action (opened, closed, reopened, etc.)
  21. # {{issue_body}} - Issue description/body (for issue events)
  22. # {{comment_body}} - Comment text (for issue_comment events)
  23. # Push Event Commands
  24. # Execute command when push event is received
  25. WEBHOOK_PUSH_ENABLED=true
  26. WEBHOOK_PUSH_COMMAND=echo "Push to {{branch}} by {{pusher}} in {{repo}}"
  27. # Example: Run deployment script
  28. # WEBHOOK_PUSH_COMMAND=/path/to/deploy.sh {{branch}} {{repo}} {{pusher}}
  29. # Example: Only deploy main branch
  30. # WEBHOOK_PUSH_FILTER_BRANCH=main
  31. # WEBHOOK_PUSH_COMMAND=/path/to/deploy-production.sh
  32. # Pull Request Event Commands
  33. WEBHOOK_PULL_REQUEST_ENABLED=false
  34. WEBHOOK_PULL_REQUEST_COMMAND=echo "PR #{{pr_number}} {{pr_action}} by {{pusher}}"
  35. # Create Event Commands (new branch or tag)
  36. WEBHOOK_CREATE_ENABLED=false
  37. WEBHOOK_CREATE_COMMAND=echo "Created {{ref_type}} {{branch}} in {{repo}}"
  38. # Delete Event Commands
  39. WEBHOOK_DELETE_ENABLED=false
  40. WEBHOOK_DELETE_COMMAND=echo "Deleted {{ref_type}} {{branch}} from {{repo}}"
  41. # Release Event Commands
  42. WEBHOOK_RELEASE_ENABLED=false
  43. WEBHOOK_RELEASE_COMMAND=echo "Release {{tag}} {{pr_action}} in {{repo}}"
  44. # Issues Event Commands (ticket/bug created, closed, reopened)
  45. WEBHOOK_ISSUES_ENABLED=false
  46. WEBHOOK_ISSUES_COMMAND=echo "Issue #{{issue_number}} {{issue_action}} by {{pusher}} in {{repo}}: {{issue_title}}"
  47. # Example: Send notification when issue is opened
  48. # WEBHOOK_ISSUES_COMMAND=/path/to/notify-team.sh "{{issue_title}}" "{{issue_number}}" "{{pusher}}"
  49. # Example: Auto-label or assign issues
  50. # WEBHOOK_ISSUES_COMMAND=/path/to/triage-issue.sh {{repo}} {{issue_number}} "{{issue_body}}"
  51. # Issue Comment Event Commands
  52. WEBHOOK_ISSUE_COMMENT_ENABLED=false
  53. WEBHOOK_ISSUE_COMMENT_COMMAND=echo "Comment on issue #{{issue_number}} by {{pusher}}: {{comment_body}}"
  54. # Example: Trigger CI on specific comment commands
  55. # WEBHOOK_ISSUE_COMMENT_COMMAND=/path/to/check-comment-commands.sh "{{comment_body}}" {{issue_number}}
  56. # Global Command (runs for ALL events)
  57. WEBHOOK_GLOBAL_ENABLED=false
  58. WEBHOOK_GLOBAL_COMMAND=echo "Webhook {{event}} received for {{repo}}"
  59. # Command Execution Settings
  60. COMMAND_TIMEOUT=300000
  61. COMMAND_WORKING_DIR=/workspace