Skip to content

feat(slack): Add Declare incident message shortcut for threads - #422

Closed
sentry-junior[bot] wants to merge 2 commits into
mainfrom
feat/declare-incident-shortcut
Closed

sentry-junior[bot] wants to merge 2 commits into
mainfrom
feat/declare-incident-shortcut

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Slack doesn't deliver custom slash commands from threads (docs: "Slash commands created by developers cannot, however, be invoked in message threads"). So when someone types /inc in a thread, Firetower's command isn't offered. In #discuss-infra this led to someone accidentally declaring the incident through the Datadog incident bot instead.

This adds a Declare incident message shortcut (message ⋮ → More actions). It works on any message, including thread replies:

  • Opens the same new_incident_modal as /inc new, with the invoking channel and thread stored in private_metadata.
  • The "incident created, please join #inc-…" notice gets posted in that thread. If the shortcut is used on a top-level message, the notice is threaded under that message.
  • private_metadata stays a bare channel id for /inc new. JSON is used only when there's a thread, so modals opened before the deploy still parse.
  • The severity re-render keeps the thread context.
  • /inc help mentions the shortcut.

Rollout: the shortcut also has to be added to the prod and test Slack app configs. slack-app-manifest.yaml is updated, but the manifest isn't applied automatically. Until then, Slack won't show the shortcut.

Checks: pytest src/firetower/slack_app (322 passed), ruff format/check, mypy src, pre-commit on changed files.

via Spencer.

--

View Junior Session [Sentry]

Slack doesn't deliver custom slash commands from threads, so /inc new
can't be used there. Add a message shortcut that opens the same new
incident modal and threads the creation notice under the source message.

Co-Authored-By: Spencer Murray <spencer.murray@sentry.io>
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner October 23, 2026 20:03
Typing /inc in a thread opens Slack's shortcuts menu, which only lists
global shortcuts and built-in commands. Without a Firetower global
shortcut, Datadog's incident shortcut is the only match.

Co-Authored-By: Spencer Murray <spencer.murray@sentry.io>
@sentry-junior sentry-junior Bot closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants