Send notifications to Slack
What does this MR do and why?
This MR enables Integrations::GitlabSlackApplication#notify
to send notifications of certain GitLab events to Slack.
There are 3 integrations that interact with Slack. Integrations::GitlabSlackApplication
is the only one that works with the GitLab for Slack app.
The notifications that Integrations::GitlabSlackApplication
can now send are identical to those sent by the Integrations::Slack
model, but the way we notify is different. In a future step we will deprecate Integrations::Slack
to consolidate the Slack notifications functionality into one integration that works with the GitLab for Slack app &8673.
There is a separate documentation MR !104639 (merged).
Screenshots or screen recordings
Setting up integration
Configuring to receive issue notifications in a public Slack channel
Configuring to receive issue notifications both a public and private Slack channel
How to set up and validate locally
To QA this feature you must have access to the Ecosystem Test Slack Workspace.
- Start a new GitPod instance and configure the GitLab for Slack (dev) app to work with it (docs)
- Checkout this feature branch,
bundle
andyarn
, and restart GDK (docs) - Enable the flag. On the GitPod terminal:
cd /workspace/gitlab && bundle exec rails c
, then:Feature.enable(:integration_slack_app_notifications)
- Choose a project, and set up the Slack application integration.
- Once set up, you can specify a channel to post events to.
- Public channels will receive Slack posts with no further user action. Private channels require
@GitLab (dev)
to be invited to the channel first.- To post to a private channel, go to the private channel, type
/add
and choose "Add apps to this channel", then chooseGitLab (dev)
.
- To post to a private channel, go to the private channel, type
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #373321 (closed)