Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(slack): advertise when others are creating an incident #115

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jennafauconnier
Copy link
Collaborator

Implement Notifications for Incident Opening and Creation Links in Slack

Description

This PR introduces two new message classes for handling notifications related to incident management in the Slack application. The first class provides a warning when a user is in the process of opening an incident, while the second class informs users when a new incident has been created.

Changes Made

✅ Created SlackMessageIncidentOpeningWarning to notify users when an incident is being opened.
✅ Created SlackMessageIncidentCreationRedirection to inform users of a new incident creation.
✅ Updated IDs for both classes to ensure they are distinct and descriptive.

Motivation and Context

These changes are important to improve user experience by preventing multiple incident creations and guiding users to newly created incidents. By providing timely notifications, we can enhance communication and efficiency within the team.

How to Test

  1. Trigger the /open command in a Slack channel to test the SlackMessageIncidentOpeningWarning.
  2. Verify that the warning message appears correctly and mentions the user who initiated the action.
  3. Create a new incident and ensure that the SlackMessageIncidentCreationRedirection message is sent to the channel.
  4. Check that the message correctly refers to the newly created incident and provides accurate channel information.

Checklist

  • I have tested my changes
  • My code follows the style guidelines of this project

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 42.30769% with 15 lines in your changes missing coverage. Please review.

Project coverage is 62.80%. Comparing base (60a7836) to head (0527a72).

Files with missing lines Patch % Lines
src/firefighter/slack/messages/slack_messages.py 57.14% 6 Missing ⚠️
src/firefighter/slack/views/modals/open.py 25.00% 6 Missing ⚠️
...hter/slack/signals/create_incident_conversation.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #115      +/-   ##
==========================================
- Coverage   62.83%   62.80%   -0.04%     
==========================================
  Files         215      215              
  Lines        9587     9613      +26     
  Branches     1289     1289              
==========================================
+ Hits         6024     6037      +13     
- Misses       3354     3367      +13     
  Partials      209      209              
Flag Coverage Δ
unittests 62.80% <42.30%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GabDug GabDug changed the title Feature/detect users feat(slack): advertise when others are creating an incident Oct 29, 2024
@@ -37,13 +38,15 @@
@receiver(signal=create_incident_conversation)
def create_incident_slack_conversation(
incident: Incident,
source_channel: IncidentChannel,
Copy link
Collaborator

Choose a reason for hiding this comment

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

In trigger_incident_workflow, it's Any, so we need to check that it's an IncidentChannel, and probably accept None by default.

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.

3 participants