Skip to content

Add search-by-project-path to GitLab Slack Slash Commands

Joseph Wambua requested to merge jj_386430_slack_slash_commands_by_project into master

What does this MR do and why?

When using Slack slash commands on GitLab via the GitLab for Slack app, some commands require a project alias in order to perform actions on specific projects. These aliases are set per project in the integration settings page, and when users use the slash commands they need to know the alias for each project.

In this MR, we add the ability to use both the alias and project path, which makes it easier for users to use slash commands without having to memorize aliases.

More information can be found in the issue: https://gitlab.com/gitlab-org/gitlab/-/issues/386430

Before After
In the current implementation, when a project has the 'GitLab for Slack app' integration enabled, you can only refer to the project using its alias After this change, a user can use either the project path or alias when using slash commands
In the examples below, the twitter/Typeahead.js project has the integration enabled, with the alias set as: tester123
Here, the project cannot be found using its path: image image In this case, we are able to reference the project using its path: image
But it can be found using the alias: image

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

In order to test Slack Slash commands in a development environment, Slack needs to have direct access to the GitLab instance. In order to achieve, this, the required approach is to use GitPod.

Instructions on how to set up this test can be found here.

To make testing easier, I already have a test environment available on GitPod, and I can share the credentials privately to the reviewer since the instance is accessible via the internet.

MR acceptance checklist

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

Merge request reports

Loading