Skip to content

feat(slack): Send priority changes to the notification channel - #282

Open
rgibert wants to merge 6 commits into
mainfrom
rgibert/send-priority-channels-to-notice-channel
Open

feat(slack): Send priority changes to the notification channel#282
rgibert wants to merge 6 commits into
mainfrom
rgibert/send-priority-channels-to-notice-channel

Conversation

@rgibert

@rgibert rgibert commented Jul 13, 2026

Copy link
Copy Markdown
Member

Currently when incident priority is changed we don't notify the notification channel. This means when priority changes it's only visible to people already in the channel, this isn't always all the people interested in the channel (especially when an incident transitions to P0 or P1).

Currently when incident priority is changed we don't notify the notification channel.  This means when priority changes it's only visible to people already in the channel, this isn't always all the people interested in the channel (especially when an incident transitions to P0 or P1).
@rgibert rgibert self-assigned this Jul 13, 2026
@rgibert
rgibert requested a review from a team as a code owner July 13, 2026 18:35
Comment thread src/firetower/incidents/hooks.py Outdated
Replace in-place dict mutations (settings.SLACK["key"] = val) with dict
replacement (settings.SLACK = {**settings.SLACK, "key": val}) so
pytest-django's settings fixture properly restores the original dict
between tests.

Also set mock_slack.post_message.return_value in test_posts_to_feed_channel
since the PR now saves the feed message timestamp to the database.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread src/firetower/incidents/hooks.py
Comment thread src/firetower/integrations/services/slack.py
Comment thread src/firetower/incidents/migrations/0024_add_feed_message_ts.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 45d841b. Configure here.

description=description,
)
decorate_incident_channel(ctx, _slack_service)
_decoration = decorate_incident_channel(ctx, _slack_service)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallback drops feed message timestamp

Low Severity

decorate_incident_channel now returns feed_message_ts, and the normal create path saves it, but the degraded-mode fallback assigns the result to _decoration and ignores it. The feed post still happens with no incident row to store the timestamp, and backfill never recovers it, so later severity changes for those incidents never notify the feed channel.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 45d841b. Configure here.

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.

1 participant