Skip to content

GitLab Webhook

Webhooks enable near-instant reactions to MR and pipeline events. Without webhooks, Auto Merge still works via 15-second polling.

  1. Go to Settings > Webhooks in the GitLab project
  2. Set the URL: https://<auto-merge-host>/api/auto-merge/events/from-gitlab
  3. Select triggers:
    • Merge request events
    • Pipeline events
  4. Click Add webhook

When GitLab sends a webhook event, Auto Merge immediately triggers a processing run instead of waiting for the next poll cycle. Webhook-triggered runs are debounced to avoid redundant executions when multiple events arrive in quick succession.

Auto Merge polls the GitLab API every 15 seconds. This works reliably but introduces a small delay between an MR state change and Auto Merge reacting to it. Webhooks reduce this delay to near-zero.