Propagate records for GitLab for Slack integration
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.
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:
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.
- You will need a Slack workspace to test with (other than GitLab's Slack workspace, which will not let you configure Slack apps).
- In rails console enable the feature
Feature.enable(:gitlab_for_slack_app_instance_and_group_level)
- Enable the GitLab for Slack app for your instance:
- Go to
/admin
- Go Settings > General
- Next to GitLab for Slack app click Expand
- Click the Install GitLab Slack app...* button
- Follow the instructions and install the GitLab Slack app into your Slack workspace.
- Back in the GitLab admin, check Enable GitLab for Slack app and complete the Step 2: Configure the app settings settings.
- Go to
QA
- Choose a Group that has at least 1 project
- Go Settings > Integrations
- Select GitLab for Slack app
- Click Install GitLab for Slack app...
- Complete the OAuth flow
- The GitLab for Slack app integration should be enabled for the group
- 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:
- Go back and edit the GitLab for Slack app integration for the group
- 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
- 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:
- Go back and edit the GitLab for Slack app integration for the group
- Click the red bin icon to disable the integration
- The GitLab for Slack app integration for the project should also be disabled
Related to #391526 (closed)