Design: Authorize project to use for incident slash commands in Slack
Update
This issue was intended to help individual users authorize projects for use with the incident management slash commands in Slack. ~"group::integrations" may instead be able to complete Identify users in Slack without a project or in... (&9418 - closed), which is what this issue was intended as a work-around for. Assuming that proceeds as planned, we may not need to implement this feature. If we do, we can move straight to the Post https://gitlab.com/gitlab-org/gitlab/-/issues/357221 version flow
.
Problem
The first time a user enters an incident slash command in Slack, how do we know which project we should create an incident in on their behalf, if none have been previously authorized?
Proposal
Introduce a /gitlab connect
slash command. Entering that command will bring users to a landing page on GitLab that allows them to select from a list of projects that have the GitLab for Slack app integration configured, so they can choose which projects to authorize. How it would work:
- User enters
/gitlab connect
in Slack - They will be re-directed to a new landing page to select projects that already have the GitLab for Slack app installed
- They select a project
- We drop them into the same flow as when a user uses the
/gitlab <project-alias> issue show <id>
slash command, which is to confirm that they authorize the account connection. - They can use the incident slash commands, including
/incident declare
After #357221 (closed) we could remove the landing page step of selecting a project, and the command could still function as a proactive GitLab user-Slack user connection in future. As a note, until #357221 (closed) is completed, every user who wants to use the incident slash command would have to go through this authorization process, to properly authorize the connection between their ChatName
and the project.
Initial version's flow:
- A maintainer sets up the GitLab for Slack app integration for a project they wish to declare incidents for.
- A user of the slash command must identify themselves. To do this, they must select a project they belong to and that has the GitLab for Slack app integration installed, and then afterwards they are prompted to authorize the Slack user account.
- This could happen after they use
/incident declare
for the first time, or: - This could happen after they use
/gitlab connect
- This could happen after they use
Post #357221 (closed) version flow:
- A maintainer installs the GitLab for Slack app to their workspace.
- A user of the slash command must identify themself first. To do this, they are prompted in GitLab to authorize the Slack user account (using the existing authorization flow).
- This could happen after they use
/incident declare
for the first time, or: - This could happen after they use
/gitlab connect
- This could happen after they use