Skip to content

feat(incidents): Set channel topic on status channels#243

Open
rgibert wants to merge 10 commits into
mainfrom
rgibert/status-channel-topic
Open

feat(incidents): Set channel topic on status channels#243
rgibert wants to merge 10 commits into
mainfrom
rgibert/status-channel-topic

Conversation

@rgibert
Copy link
Copy Markdown
Member

@rgibert rgibert commented Jun 5, 2026

Update topic updates to parallel update the topic for #inc-xxxx and #inc-xxxx-status channels.

Status channels were created without a topic, while the main incident
channel always had one set. Now the status channel gets the same topic
as the main channel at creation time and whenever the topic-relevant
fields (title, severity, captain) change.

Co-Authored-By: Claude <noreply@anthropic.com>

Agent transcript: https://claudescope.sentry.dev/share/AvmWtSfOOeXg5PYEsqE2lSHWXgDXqqOQpUbwYuyXvng
@rgibert rgibert marked this pull request as ready for review June 5, 2026 13:52
@rgibert rgibert requested a review from a team as a code owner June 5, 2026 13:52
Comment thread src/firetower/incidents/hooks.py Outdated
…ions

Wrap status channel set_channel_topic calls in their own try/except
blocks in on_severity_changed, on_title_changed, and on_captain_changed
so a failure does not skip subsequent message posting or user invites.

Co-Authored-By: Claude <noreply@anthropic.com>

Agent transcript: https://claudescope.sentry.dev/share/sbcLyL6uXbXaI0a1CGpm4p26nvdj-LI_WJ1J6FNVDSQ
@rgibert rgibert enabled auto-merge (squash) June 5, 2026 14:02
Comment thread src/firetower/incidents/hooks.py Outdated
…h try/except

An unhandled exception from _get_status_channel_id would halt the
rest of on_incident_updated, skipping notifications, slack dumps,
and severity escalation handling.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread src/firetower/incidents/hooks.py Outdated
…_incident_updated

The refactor inadvertently moved build_channel_topic outside the
try/except block, meaning a failure in topic construction would
propagate uncaught and abort the rest of on_incident_updated.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread src/firetower/incidents/hooks.py
Comment thread src/firetower/incidents/hooks.py Outdated
…ch other

In on_severity_changed and on_title_changed, a failure setting the main
channel topic no longer skips the status channel update.

In on_incident_updated, build_channel_topic is now separated from the
set_channel_topic call so a Slack API failure does not discard the
already-built topic and skip the status channel update.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread src/firetower/incidents/hooks.py Outdated
Wrap set_channel_topic for the main channel in its own try/except so
a failure does not skip posting the captain update message or inviting
the new captain to the channel.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread src/firetower/incidents/hooks.py Outdated
Comment thread src/firetower/incidents/hooks.py
Comment thread src/firetower/incidents/hooks.py
Copy link
Copy Markdown

@cursor cursor Bot left a comment

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 a641bf4. Configure here.

Comment thread src/firetower/incidents/hooks.py
Comment thread src/firetower/integrations/services/slack.py
Comment thread src/firetower/incidents/hooks.py Outdated
Comment thread src/firetower/incidents/hooks.py
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