GitLab Integration
Receive GitLab notifications directly in Mattermost channels — for commits, merge requests, pipeline results, and issues.
Prerequisites:
- Managed Mattermost at server.camp
- Managed GitLab at server.camp (or any other GitLab instance)
- Admin access to Mattermost, Maintainer access to the GitLab project
GitLab sends a message to a URL — called a webhook — whenever specific events occur (commits, MRs, pipelines, etc.). Mattermost provides webhook URLs that convert incoming messages into channel posts. You connect the two.
- Open the Main Menu → Integrations in Mattermost (or navigate directly to
https://your-mattermost.srv.camp/[teamname]/integrations/incoming_webhooks/add) - Click “Add Incoming Webhook”
- Configure:
- Title: e.g.
GitLab – Website Project - Description: optional
- Channel: the channel where GitLab messages should appear (e.g.
#developmentor#gitlab) - Username: optional, e.g.
GitLab— displayed as the sender name
- Save — Mattermost shows a webhook URL. You’ll need this in Step 2.
One webhook per projectCreate a separate webhook in Mattermost for each GitLab project you want to connect. This lets you route notifications from different projects into different channels.
GitLab has a built-in Mattermost integration. In your GitLab project, go to:
Settings → Integrations → Mattermost notifications
- Enable: Check the “Active” box
- Webhook: Paste the webhook URL from Step 1
- Username: optional (
GitLab) - Triggers: Choose which events should send notifications:
| Event | Recommendation | Description |
|---|---|---|
| Push | Useful for dev channels, but can be noisy on active branches | Every code push |
| Tag push | Great for communicating releases | When a Git tag is created |
| Note | Useful for code review channels | Comments on issues or MRs |
| Issue | Yes | Issue created, closed, or assigned |
| Merge request | Yes | MR created, approved, or merged |
| Pipeline | Yes | Pipeline passed or failed |
| Deployment | Optional | Deployment started or completed |
- Optional: Under “Branches to be notified”, restrict push notifications to the
mainbranch to reduce noise from feature branches. - Click “Test settings” to send a test message.
- Save.
Too many notifications?Start with only Merge request and Pipeline — these are the most relevant events in a code review workflow. Push notifications can generate a high volume of messages on active teams.
After setup, GitLab events appear automatically as messages in the selected channel. A pipeline notification looks like this:
✅ Pipeline #42 passed for Website Project (main) — max.mustermann
Commit: "Revised login page"
Duration: 3 min 42 s
Failed pipelines show ❌ instead of ✅ — ideal for spotting build issues at a glance.
Instead of configuring each project individually, set up the integration at the GitLab group level:
Group → Settings → Integrations → Mattermost notifications
This applies notifications to all projects within the group — useful for organization-wide channels like #all-deployments.
If you run into issues with the GitLab–Mattermost integration, reach out at support@server.camp.