Close issue via slash comment in Slack
Problem to solve
Users need a chat tool to collaborate during a fire-fight. It needs to be closely integrated with the GitLab issue to minimize context/tool switching. It needs to enable easy communication and be familiar/intuitive to use
Supporting detail and research can be found on &1524
There are a couple existing Slack services already built:
We will leverage these for our MVC. Here is the user journey we want to support for the MVC. Only 2 of the steps require work. The remainder are done by existing functionality as indicated:
- Alert is triggered by Prometheus and auto-creates issue in GitLab (already exists)
- Issue is auto-labelled
incident(being built now in
- Issue is sent to Slack to pre-configured channel (can already do this using Slack Notifications service)
- Users notified based on channel notification settings (Existing slack functionality)
- Users collaborate in in thread (Existing slack functionality)
- Issue is closed
- Users close issue using slash command (need to create slash command, but there is a Slack Slash Commands service)
- Issue is closed in GitLab
- System message posts to Issue discussion in GitLab indicating the issue was closed via Slash command in Slack (if that is the case)
- Message posts to threaded discussion in Slack the incident has been resolved (event is already sent to Slack via existing functionality)
The scope of this issue:
- Create Slack slash command that allows a user to close a GitLab issue from within Slack. IDEALLY, the slash command can be done in a thread for an incident and does not require any inputs. If that is not possible, follow the same pattern other slash commands follow!
- IF POSSIBLE: Modify the system message that posts to the GitLab issue to indicate that the issue was closed from Slack and include the slack username. This may not be possible and is left up to engineering to determine!
Engineering outcomes of scope:
- Slash commands are unfortunately not supported in threads (to trigger or post notifications to).
- The system notes will indicate which user closed the issue, but including the source will be saved for another issue if we want it.