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 |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
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 declareis used - Fields in scope: project, title, description, severity, confidential, zoom link
-
projectdropdown should contain the list of projects available for the Slackteam_idof the request. The first project should be selected by default -
severitydropdown 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:
- In-channel notifications about new incidents is part of Phase 2: Display Slack notification when an inc... (#369365 - closed)
- Status/Assignees/Labels fields are a bit more complicated, so they'll be tracked separately
Data flow:
- User enables the
Slack applicationintegration on gitlab.com (Settings > Integrations) - User enters
/gitlab incident declarein any channel in slack - Slack POSTs to
/slack/trigger, which is configured in our slack app - GitLab must return a prompt acknowledgement response
- GitLab POSTs to
response_urlfrom the previous Slack request. Payload should contain json representing the modal layout. - User fills in details & submits form.
- Slack POSTs to
/slack/triggerwith the payload for the submission. - Respond with an empty acknowledgement response to close the modal
- After creating the incident, GitLab POSTs to
response_urlfrom 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.



