Skip to content

Feedback Rules

Configure notifications for merge queue and pipeline events.

Creating a Rule

bash
curl -X POST https://gitwire.yourdomain.com/api/phase2/feedback \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "slack-on-failure",
    "event_type": "merge_failure",
    "repo_filter": "*",
    "post_pr_comment": true,
    "slack_webhook": "https://hooks.slack.com/services/...",
    "include_log_link": true,
    "include_diff_preview": false,
    "enabled": true
  }'

Rule Fields

FieldTypeDescription
nameTEXTHuman-readable rule name
event_typeTEXTEvent to trigger on (see below)
repo_filterTEXTGlob pattern for repo matching (* = all)
post_pr_commentBOOLEANPost a comment on the PR
slack_webhookTEXTSlack webhook URL (optional)
teams_webhookTEXTMicrosoft Teams webhook URL (optional)
include_log_linkBOOLEANInclude CI log link in notification
include_diff_previewBOOLEANInclude diff preview
enabledBOOLEANEnable/disable the rule

Event Types

EventWhen It Triggers
merge_successPR merged successfully
merge_failureMerge failed
merge_blockedPR blocked by checks
queue_admittedPR admitted to queue
rollbackMerge was rolled back

Managing Rules

bash
# List all rules
curl https://gitwire.yourdomain.com/api/phase2/feedback \
  -H "Authorization: Bearer YOUR_API_KEY"

# Update a rule
curl -X PUT https://gitwire.yourdomain.com/api/phase2/feedback/1 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'

# Delete a rule
curl -X DELETE https://gitwire.yourdomain.com/api/phase2/feedback/1 \
  -H "Authorization: Bearer YOUR_API_KEY"

AI Review Gate

Released under the MIT License.