Skip to content

Add modal for incident declare command

What does this MR do and why?

After adding base logic for the new incident declare command in !101177 (merged)

This MR adds code to open a modal when the command is used.

In the first MR, it returned the It works! text when the command is triggered.

But this MR opens a modal, the modal is not functional to be submitted yet, it just opens and sends an ephemeral message Please fill the incident creation form.

When the modal is closed, it sends Incident creation canceled as an ephemeral message to slack.

There are some changes that are made by adding EE counterparts to some modules/classes to pass the FOSS impact job. There is a follow-up issue #381408 (closed) to move all the code for the incident declare command to the EE namespace which will be picked up later.

This feature is behind a user-based FF and is disabled by default.

Screenshots or screen recordings

Screen_Recording_2022-11-09_at_10.05.25_AM

How to set up and validate locally

  1. Follow the steps mentioned in https://gitlab.com/gitlab-org/manage/integrations/team/-/blob/main/integrations/slack.md for setting up a slack workspace to test the command.
  2. Follow the steps mentioned in https://gitlab.com/gitlab-org/manage/integrations/team/-/blob/main/integrations/slack.md#switching-to-your-feature-branch to switch the GitPod branch.
  3. Enable the FF, :incident_declare_slash_command per user to see it on the list of commands if that specific user can send a command.
  4. Trigger /dev-gitlab incident declare.
  5. See the modal with a few fields and the ephemeral message. (The modal is not functional yet)
  6. Close the modal by hitting Cancel or the close icon on the top right, and see the cancellation ephemeral message.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #344856 (closed)

Edited by Luke Duncalfe

Merge request reports