Skip to content

Allow multiple Slack channels for notifications

Justin Ho Tuan Duong requested to merge 14080-slack-multiple-channels into master

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

Screen_Shot_2020-02-22_at_18.29.10

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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

Merge request reports

Loading