Skip to content

Phase 1: Add `/gitlab incident declare` Slack slash command

Release notes

Problem to solve

We can currently open issues from Slack. But, not incidents. We should ensure this action is possible, to better support the incident management workflow.

Proposal

Introduce a new Slack slash command for creating incidents. Entering the slash command will trigger a modal where incident details can be added. These added details will be displayed in the incident that's created. So, if a user adds, for instance, a zoom link or a Slack channel at the time of incident creation, these details should display in the Linked resources widget. If a label or assignee had been added, those would display in the incident, as well.

New Slack slash command for creating an incident Modal for inputting incident details Example created incident Success/failure messages
New_slash_command Modal__1_ Auto-populated_incident failure_messages

Figma file

Note: This should be behind the :incident_creation_slash_command feature flag.

Intended Users

Technical details

Scope:

  • Trigger modal for incident creation when /gitlab incident declare is used
  • Fields in scope: project, title, description, severity, confidential, zoom link
    • project dropdown should contain the list of projects available for the Slack team_id of the request. The first project should be selected by default
    • severity dropdown should contain the severity options, with no default selected
  • Ephemeral error message should be presented to the user in slack if we do not create an incident
  • Ephemeral confirmation message should be presented to the user in slack after the incident is created
  • User must have permissions to create incidents
  • GitLab Core+

Out of scope:

Data flow:

  1. User enables the Slack application integration on gitlab.com (Settings > Integrations)
  2. User enters /gitlab incident declare in any channel in slack
  3. Slack POSTs to /slack/trigger, which is configured in our slack app
  4. GitLab must return a prompt acknowledgement response
  5. GitLab POSTs to response_url from the previous Slack request. Payload should contain json representing the modal layout.
  6. User fills in details & submits form.
  7. Slack POSTs to /slack/trigger with the payload for the submission.
  8. Respond with an empty acknowledgement response to close the modal
  9. After creating the incident, GitLab POSTs to response_url from the previous Slack request. Payload should contain an ephemeral message, visible to the user who created the incident. The message either confirms successful creation or offers details of the erro.

Supplemental details:

  • Slack dropdowns trigger "actions" which will be posted to the same endpoint, so we need to make sure the endpoint returns an acknowledgement response for those interactions, even if we don't intend to do anything with them. We do not want to return a 404, as too many errors could cause Slack API throttling.

Metrics

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by Amelia Bauerly