The Mattermost Notifications Service allows your GitLab project to send events (e.g.,
issue created) to your existing Mattermost team as notifications. This requires configurations in both Mattermost and GitLab.
You can also use Mattermost slash commands to control GitLab inside Mattermost. This is the separately configured Mattermost slash commands.
To enable Mattermost integration you must create an incoming webhook integration:
- Sign in to your Mattermost instance.
- Visit incoming webhooks, that will be something like:
- Choose a display name, description and channel, those can be overridden on GitLab.
- Save it, copy the Webhook URL, we’ll need this later for GitLab.
Incoming Webhooks might be blocked on your Mattermost instance. Ask your Mattermost admin to enable it on:
- Mattermost System Console > Integrations > Integration Management in Mattermost versions 5.12 and later.
- Mattermost System Console > Integrations > Custom Integrations in Mattermost versions 5.11 and earlier.
Display name override is not enabled by default, you need to ask your admin to enable it on that same section.
After you set up Mattermost, it’s time to set up GitLab.
Navigate to the Integrations page and select the Mattermost notifications service to configure it. There, you will see a checkbox with the following events that can be triggered:
- Confidential issue
- Merge request
- Confidential note
- Tag push
- Wiki page
Below each of these event checkboxes, you have an input field to enter
which Mattermost channel you want to send that event message. Enter your preferred channel handle (the hash sign
# is optional).
At the end, fill in your Mattermost details:
|Webhook||The incoming webhook URL which you have to set up on Mattermost, it will be something like: |
|Username||Optional username which can be on messages sent to Mattermost. Fill this in if you want to change the username of the bot.|
|Notify only broken pipelines||If you choose to enable the Pipeline event and you want to be only notified about failed pipelines.|