Add notifications to Slack App integration - Part 1
About
This issue is part of the epic &8670 (closed). See that epic for more context.
We have two Slack integrations that we want to merge into one:
-
Slack Notifications integration (model:
Integrations::Slack
). -
Slack Application integration (model:
Integrations::GitlabSlackApplication
).
The Slack Notifications integration allows users to subscribe to events in GitLab and receive notifications of those events in a Slack channel.
The Slack Application integration allows users to use the features of the GitLab Slack App (currently limited to slash commands, but rapidly being built out!).
We want to merge the Slack Notifications integration into the Slack Application integration, so users need to only enable the Slack Application integration in order to use both the features of the Slack App and Slack notifications.
Risks
This kind of refactoring can uncover hidden complexity that might mean the weight of the issue should be increased once it has started.
If it's necessary to increase the weight then please communicate this to the PM and EM on this issue.
Proposal
The work for this is broken into 2 issues, with #373321 (closed) being the second part.
Backend
Although this hasn't been technically verified, it should be possible to:
- Change
Integrations::GitlabSlackApplication
to inherit fromBaseChatNotification
. - Share code between
Integrations::Slack
andIntegrations::GitlabSlackApplication
by wrapping the shared code in a new module they both mixin.
This would port the backend functionality of the Slack Notifications integration into the Slack Application integration.
No-op when notifying
For this iteration, the actual posting of notifications to Slack will be a no-op (meaning, for this iteration the integration will not post a notification, but will still technically do everything up to that point), and #373321 (closed) will implement this next step.
Feature flag
The change should be behind a feature flag that will not be enabled on production until #373321 (closed). The notification settings form should not display when the feature flag is disabled, so for this iteration, customers should see no changes.
Frontend
TODO We need to understand the frontend part of this and the work involved in having the Slack Notifications settings display on the Slack Application integration form.
Design
Step | Image |
---|---|
Put a warning banner for everyone | ![]() |