debian-mirror-gitlab/doc/user/project/integrations/mattermost.md
2021-04-29 21:17:54 +05:30

2.9 KiB

stage group info
Create Ecosystem To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments

Mattermost notifications service (FREE)

Use the Mattermost notifications service to send notifications for GitLab events (for example, issue created) to Mattermost. You must configure both Mattermost and GitLab.

You can also use Mattermost slash commands to control GitLab inside Mattermost.

Configure Mattermost to receive GitLab notifications

To use the Mattermost integration you must create an incoming webhook integration in Mattermost:

  1. Sign in to your Mattermost instance.
  2. Enable incoming webhooks.
  3. Add an incoming webhook.
  4. Choose a display name, description and channel, those can be overridden on GitLab.
  5. Save it and copy the Webhook URL because we need this later for GitLab.

Incoming Webhooks might be blocked on your Mattermost instance. Ask your Mattermost administrator 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 administrator to enable it on that same section.

Configure GitLab to send notifications to Mattermost

After the Mattermost instance has an incoming webhook set up, you can set up GitLab to send the notifications.

Navigate to the Integrations page and select the Mattermost notifications service. Select the GitLab events you want to generate notifications for.

For each event you select, input the Mattermost channel you want to receive the notification. You do not need to add the hash sign (#).

Then fill in the integration configuration:

Field Description
Webhook The incoming webhook URL on Mattermost, similar to: http://mattermost.example/hooks/5xo….
Username (Optional) The username to show on messages sent to Mattermost. Fill this in to change the username of the bot.
Notify only broken pipelines If you enable the Pipeline event and you want to be notified about failed pipelines only.
Branches to be notified Select which branches to send notifications for.
Labels to be notified (Optional) Labels that the issue or merge request must have to trigger a notification. Leave blank to get notifications for all issues and merge requests.