Skip to main content
server.camp Docs
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

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

How it works

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.


Step 1: Create an incoming webhook in Mattermost

  1. Open the Main Menu → Integrations in Mattermost (or navigate directly to https://your-mattermost.srv.camp/[teamname]/integrations/incoming_webhooks/add)
  2. Click “Add Incoming Webhook”
  3. Configure:
  • Title: e.g. GitLab – Website Project
  • Description: optional
  • Channel: the channel where GitLab messages should appear (e.g. #development or #gitlab)
  • Username: optional, e.g. GitLab — displayed as the sender name
  1. Save — Mattermost shows a webhook URL. You’ll need this in Step 2.
One webhook per project
Create a separate webhook in Mattermost for each GitLab project you want to connect. This lets you route notifications from different projects into different channels.

Step 2: Configure the GitLab–Mattermost integration

GitLab has a built-in Mattermost integration. In your GitLab project, go to:

Settings → Integrations → Mattermost notifications

  1. Enable: Check the “Active” box
  2. Webhook: Paste the webhook URL from Step 1
  3. Username: optional (GitLab)
  4. 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
  1. Optional: Under “Branches to be notified”, restrict push notifications to the main branch to reduce noise from feature branches.
  2. Click “Test settings” to send a test message.
  3. 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.

Step 3: Verify results in Mattermost

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.


Group-level integration (all projects in a group)

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.


Questions?

If you run into issues with the GitLab–Mattermost integration, reach out at support@server.camp.