GitLab Integration
Dispatch provides a first-class GitLab integration that automatically creates webhook endpoints for your projects.
Connecting GitLab
- Navigate to your project's Sources page
- Click Connect GitLab
- Authorize the Dispatch GitLab OAuth app
- Select a GitLab project
- 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:
| Mode | Description |
|---|---|
| Push only | Receive only push (commit) events. |
| All events | Receive every event type GitLab supports for the project. |
| Custom | Pick 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:
| Event | Description |
|---|---|
Push Hook | Commits pushed to a branch |
Merge Request Hook | MR opened, closed, merged, approved |
Issue Hook | Issue opened, closed, updated |
Note Hook | Comment on an issue, MR, commit, or snippet |
Tag Push Hook | Tag created or deleted |
Pipeline Hook | Pipeline created or status changed |
Job Hook | Job status change |
Release Hook | Release created or updated |
Deployment Hook | Deployment created or updated |
Member Hook | Project member added or removed |
Confidential Issue Hook | Confidential 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:
- Go to Sources and find the GitLab endpoint
- Click Disconnect
- Dispatch removes the webhook from GitLab and deactivates the endpoint