Phase 1: Add `/gitlab incident timeline <text>` Slack slash command
Problem
During incidents, incident responders may capture notes and discussions in Slack. From https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/15890#note_991678322 - "During incidents I find it much easier and faster to dump things in Slack as I go and later summarize in the issue."
Some of these items captured in Slack should also be captured in the timeline. This happens either in real time during the incident, or bulk added after the incident is completed.
Right now, there's no way for people to add items to the timeline from Slack, either in real time or in bulk after an incident is resolved. How can we better support these users?
Proposal
Introduce a Slack slash command for adding a timeline event to a GitLab incident from Slack:
- Add a
/gitlab incident timeline
Slack slash command - When a user uses the command, the following should happen:
- user is presented with an "ephemeral" message containing the last 5 incidents created in projects the Slack user has access to, with buttons to add a timeline event to the associated incident
- user is presented with links to the incident lists for each of the other projects in case their incident isn't in the last 5
- if the user doesn't have permission to view/add timeline events to any incidents, they should see an error message
- When the user selects a 'Add event' button, the following should happen:
- the timeline event is created for that incident, using the current time for when the event occurred
- the incident-list message should be replaced with a confirmation/error message
- the confirmation message should indicate the event was created successfully, with a link to the incident
- if an error occurs during creation, the user should see an informative explanation & link to documentation
Timeline slash command | User prompt to select incident | Success/failure messages |
---|---|---|
Outstanding questions:
- Whether or not we should bulk add timeline items via the API. If we want to do this, should this work be part of this issue, or separate?_
- How will the Gitlab timeline event look? Will we reference the Slack user who added the command?