Skip to content

Propagate records for GitLab for Slack integration

Luke Duncalfe requested to merge 391526-propagation into master

What does this MR do and why?

This is the last step towards the feature of supporting the GitLab for Slack app integration to be configured at group and instance-level.

#391526 (closed)

This change adds support for propagating the settings of a GitLab for Slack app integration from the instance to the group, to the project levels. This is a special version of integration management to propagate extra records that the GitLab for Slack app requires.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Demo of configuring a group-level GitLab for Slack app integration, and the settings propagating to the group's project:

SlackAppQA

How to set up and validate locally

Set up

Note: After switching to this branch, also gdk restart to ensure rails-background-jobs is running the latest code.

  1. You will need a Slack workspace to test with (other than GitLab's Slack workspace, which will not let you configure Slack apps).
  2. In rails console enable the feature
    Feature.enable(:gitlab_for_slack_app_instance_and_group_level)
  3. Enable the GitLab for Slack app for your instance:
    1. Go to /admin
    2. Go Settings > General
    3. Next to GitLab for Slack app click Expand
    4. Click the Install GitLab Slack app...* button
    5. Follow the instructions and install the GitLab Slack app into your Slack workspace.
    6. Back in the GitLab admin, check Enable GitLab for Slack app and complete the Step 2: Configure the app settings settings.

QA

  1. Choose a Group that has at least 1 project
  2. Go Settings > Integrations
  3. Select GitLab for Slack app
  4. Click Install GitLab for Slack app...
  5. Complete the OAuth flow
  6. The GitLab for Slack app integration should be enabled for the group
  7. The GitLab for Slack app integration should also be enabled for the project

Test that the GitLab for Slack app integration for the project is functional:

  1. Go back and edit the GitLab for Slack app integration for the group
  2. Configure it to trigger when an issue is opened or closed, and choose a Slack channel name that exists in your Slack workspace. Click Save changes
  3. Open a new issue in the project, and the notification should appear in the Slack channel

Test that disabling the Group-level integration disables the project-level one:

  1. Go back and edit the GitLab for Slack app integration for the group
  2. Click the red bin icon to disable the integration
  3. The GitLab for Slack app integration for the project should also be disabled

Related to #391526 (closed)

Edited by Luke Duncalfe

Merge request reports