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. To rotate it later, click Regenerate Secret in Edit Source: Dispatch updates the GitLab webhook for you, and the old secret keeps working for a while so deliveries keep verifying while the provider switches (see Signing secrets on integration sources).
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 source
- Click the unplug icon on the source, then click Disconnect to confirm
- Dispatch tries to remove the webhook from GitLab, then deletes the source (a source that still has stored events is archived instead, keeping them). If the webhook can't be removed (for example, because the GitLab connection was revoked), the source is still removed, and you delete the webhook yourself in GitLab under the project's Settings → Webhooks
To remove your GitLab account from the project, click Add Source, choose GitLab, click Disconnect next to your account, and confirm. This only removes the connection: your GitLab sources aren't deleted, and their webhooks stay in GitLab. Disconnect the projects you no longer want first, since Dispatch needs a GitLab connection to remove their webhooks.