Skip to main content

GitLab Integration

Dispatch provides a first-class GitLab integration that automatically creates webhook endpoints for your projects.

Connecting GitLab

  1. Navigate to your project's Sources page
  2. Click Connect GitLab
  3. Authorize the Dispatch GitLab OAuth app
  4. Select a GitLab project
  5. Choose which events to receive (see Event Selection below)

Dispatch will:

  • Create a webhook endpoint with provider = "gitlab"
  • Register a webhook on the selected GitLab project pointing to your Dispatch endpoint
  • Configure the endpoint to receive the selected event types

Event Selection

When connecting a GitLab project, choose one of three modes:

ModeDescription
Push onlyReceive only push (commit) events.
All eventsReceive every event type GitLab supports for the project.
CustomPick specific event types from the full list of supported GitLab hooks.

Supported GitLab Events

GitLab sends the event type in the X-Gitlab-Event header. Dispatch auto-formats the following event types:

EventDescription
Push HookCommits pushed to a branch
Merge Request HookMR opened, closed, merged, approved
Issue HookIssue opened, closed, updated
Note HookComment on an issue, MR, commit, or snippet
Tag Push HookTag created or deleted
Pipeline HookPipeline created or status changed
Job HookJob status change
Release HookRelease created or updated
Deployment HookDeployment created or updated
Member HookProject member added or removed
Confidential Issue HookConfidential issue events

Signature Verification

GitLab webhooks include an X-Gitlab-Token header containing a secret token. Dispatch performs a literal match of this header against the endpoint's signing secret. When you connect GitLab via OAuth, Dispatch automatically sets the signing secret on the GitLab webhook.

If configuring manually, set the same value in both:

  • The GitLab webhook Secret Token field
  • The Dispatch endpoint's Signing Secret

Auto-Formatted Embeds

When no custom template is assigned, Dispatch auto-detects GitLab payloads and generates specialized embeds:

Push Hook

  • Shows branch name, commit count, and commit messages
  • Links to the compare view
  • Color-coded by branch

Merge Request Hook

  • Shows MR title, description, and status
  • Includes source/target branch info
  • Color-coded by action (green for opened, purple for merged, red for closed)

Issue Hook

  • Shows issue title, description, and labels
  • Includes assignee information
  • Color-coded by action

Disconnecting

To disconnect a GitLab project:

  1. Go to Sources and find the GitLab endpoint
  2. Click Disconnect
  3. Dispatch removes the webhook from GitLab and deactivates the endpoint