gitlab-org--gitlab-foss/doc/integration/slack.md
Steven Sloan 7b339e61e8 update slack-notifier to 1.0.0, use raw webhook_url per slack recommendation
per changes with slack, they’re now using “static” web hook urls that describe the team & service with IDs that don’t change if the team or service name change. their recommendation is to use the raw webhook_url instead of building it out of components to allow more flexibility

this should also prevent issues cropping up with mistakes in how the urls are parsed
2014-10-23 14:47:28 -04:00

1.2 KiB

Slack integration

On Slack

To enable Slack integration you must create an Incoming WebHooks integration on Slack;

  1. Sign in to Slack

  2. Select Configure Integrations from the dropdown next to your team name.

  3. Select the All Services tab

  4. Click Add next to Incoming Webhooks

  5. Pick Incoming WebHooks

  6. Choose the channel name you want to send notifications to

  7. Click Add Incoming WebHooks IntegrationAdd Integrations.

    • Optional step; You can change bot's name and avatar by clicking modifying the bot name or avatar under Integration Settings.
  8. Copy the Webhook URL, we'll need this later for GitLab.

On GitLab

After Slack is ready we need to setup GitLab. Here are the steps to achieve this.

  1. Sign in to GitLab

  2. Pick the repository you want.

  3. Navigate to Settings -> Services -> Slack

  4. Fill in your Slack details

    • Mark it as active
    • Paste in the webhook url you got from Slack

Have fun :)

P.S. You can set "branch,pushed,Compare changes" as highlight words on your Slack profile settings, so that you can be aware of new commits when somebody pushes them.