Repository navigation
feat(slack): Add Declare incident message shortcut for threads - #422
Closed
sentry-junior[bot] wants to merge 2 commits into
Closed
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
/incin 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:
new_incident_modalas/inc new, with the invoking channel and thread stored inprivate_metadata.private_metadatastays a bare channel id for/inc new. JSON is used only when there's a thread, so modals opened before the deploy still parse./inc helpmentions the shortcut.Rollout: the shortcut also has to be added to the prod and test Slack app configs.
slack-app-manifest.yamlis 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]