Allow multiple Slack channels for notifications
What does this MR do?
Currently, on the Slack Notifications page (/:group/:project/-/services/slack/edit
) we only allow users to key in single channels for Slack.
This MR allows users to pass in a comma-separated channels that the backend will use to send multiple notifications.
Changes include:
- Upgrading the "slack-notifier" gem to latest version and subsequently replacing it with our own fork. This allows passing an array to the
channel
option which automatically replicates the message to multiple destinations, as stated in the documentation. However, I encountered a bug in the original repo which is unmaintained, thus had fork and rename to progress on this MR. The fork can be found here: https://gitlab.com/gitlab-org/slack-notifier/ - Split the value passed to
channel
into an array (separated by a comma,
). The spaces are trimmed to fix an issue with direct messages (they have to start with@
). - Copy / UI / documentation changes to show the user that this is now possible.
Example value that is now acceptable:
general, #people-ops, @UDLP91W0A
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Closes #14080 (closed)
Edited by Yorick Peterse