Skip to content

Commit 45d2d2e

Browse files
authored
feat(slack): EA ⚪ for actions by adding to issue alert threads FF (#70468)
1 parent 80ed536 commit 45d2d2e

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/sentry/integrations/slack/message_builder/issues.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def build_actions(
387387
"""Having actions means a button will be shown on the Slack message e.g. ignore, resolve, assign."""
388388
if actions and identity:
389389
text = get_action_text(actions, identity)
390-
if features.has("organizations:slack-improvements", project.organization):
390+
if features.has("organizations:slack-thread-issue-alert", project.organization):
391391
# if actions are taken, return True at the end to show the white circle emoji
392392
return [], text, True
393393
return [], text, False
@@ -608,7 +608,9 @@ def build(self, notification_uuid: str | None = None) -> SlackBlock:
608608
if self.actions and self.identity and not action_text:
609609
# this means somebody is interacting with the message
610610
action_text = get_action_text(self.actions, self.identity)
611-
if features.has("organizations:slack-improvements", self.group.project.organization):
611+
if features.has(
612+
"organizations:slack-thread-issue-alert", self.group.project.organization
613+
):
612614
has_action = True
613615

614616
blocks = [self.get_title_block(rule_id, notification_uuid, obj, has_action)]

tests/sentry/integrations/slack/test_message_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ def test_identity_and_action(self):
11551155
group, self.project, "test txt", [MessageAction(name="TEST")], MOCKIDENTITY
11561156
) == ([], "", False)
11571157

1158-
@with_feature("organizations:slack-improvements")
1158+
@with_feature("organizations:slack-thread-issue-alert")
11591159
def test_identity_and_action_has_action(self):
11601160
# returns True to indicate to use the white circle emoji
11611161
group = self.create_group(project=self.project)

tests/sentry/integrations/slack/webhooks/actions/test_status.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def test_archive_issue_until_escalating_block_kit(self):
347347
assert ":red_circle:" in update_data["blocks"][0]["text"]["text"]
348348

349349
@responses.activate
350-
@with_feature("organizations:slack-improvements")
350+
@with_feature("organizations:slack-thread-issue-alert")
351351
def test_archive_issue_until_escalating_block_kit_improvements(self):
352352
original_message = self.get_original_message_block_kit(self.group.id)
353353
self.archive_issue_block_kit(original_message, "ignored:archived_until_escalating")
@@ -648,7 +648,7 @@ def test_assign_issue_block_kit(self):
648648
"integration": ActivityIntegration.SLACK.value,
649649
}
650650

651-
@with_feature("organizations:slack-improvements")
651+
@with_feature("organizations:slack-thread-issue-alert")
652652
def test_assign_issue_block_kit_improvements(self):
653653
user2 = self.create_user(is_superuser=False)
654654
self.create_member(user=user2, organization=self.organization, teams=[self.team])
@@ -995,7 +995,7 @@ def test_resolve_issue_block_kit(self):
995995
assert ":red_circle:" in update_data["blocks"][0]["text"]["text"]
996996

997997
@responses.activate
998-
@with_feature("organizations:slack-improvements")
998+
@with_feature("organizations:slack-thread-issue-alert")
999999
def test_resolve_issue_block_kit_improvements(self):
10001000
original_message = self.get_original_message_block_kit(self.group.id)
10011001
self.resolve_issue_block_kit(original_message, "resolved")
@@ -1012,7 +1012,7 @@ def test_resolve_issue_block_kit_improvements(self):
10121012
assert ":white_circle:" in update_data["blocks"][0]["text"]["text"]
10131013

10141014
@responses.activate
1015-
@with_feature("organizations:slack-improvements")
1015+
@with_feature("organizations:slack-thread-issue-alert")
10161016
def test_resolve_perf_issue_block_kit_improvements(self):
10171017
group_fingerprint = f"{PerformanceNPlusOneGroupType.type_id}-group1"
10181018

0 commit comments

Comments
 (0)