Skip to content

Fix notification trigger labels to be accurate

What does this MR do and why?

This merge request updates labels for notification integrations in our VueJs app to be accurate.

#389366 (closed)

Screenshots or screen recordings

master This branch
image image

How to set up and validate locally

View changes

The easiest way to preview these view changes is to create a GitLab for Slack app integration locally, as the GitLab for Slack app integration displays all the trigger options.

  1. Enable the feature
    Feature.enable(:integration_slack_app_notifications)
  2. On the rails console:
       project = Project.find_by_full_path(<project-full-path>)
    
       # Create a GitLab Slack Application integration
       integration = project.find_or_initialize_integration('gitlab_slack_application')
       integration.assign_attributes(active: true)
       integration.save!(context: :manual_change)
    
       # Create a mock SlackIntegration record, which normally happens when someone goes through the Slack
       # app installation flow, authorizing with their Slack workspace:
       SlackIntegration.create(integration: integration, team_id: 'foo', team_name: 'foo', alias: 'foo', user_id: 'foo')
  3. View the integration settings page Settings > Integrations > Gitlab Slack application, you should see the checkboxes in the screen shots above.

Verifying accuracy

The easiest way to verify the accuracy of the trigger behaviours is to switch to gitlab.com, and configure a GitLab for Slack app integration: Settings > Integrations > Gitlab Slack application. Because we do not have permission to set up apps in the GitLab workspace, create a test Slack workspace for yourself. When you click the Install GitLab for Slack app button on the integration admin page, choose that workspace from the top-right drop down list instead of the GitLab workspace. You can then check the trigger notifications you want, and test it that doing things on gitlab.com triggers those notifications as the copy is saying in the merge request.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #389366 (closed)

Edited by Luke Duncalfe

Merge request reports