Skip to content

Commit

Permalink
bug(slack): add missing stop gap for option (#72043)
Browse files Browse the repository at this point in the history
Threads should not happen for issues if the option is off

Resolves: #71967
  • Loading branch information
ykamo001 authored Jun 5, 2024
1 parent 147f122 commit 1a2ac78
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/sentry/integrations/slack/actions/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from sentry import features
from sentry.api.serializers.rest_framework.rule import ACTION_UUID_KEY
from sentry.constants import ISSUE_ALERTS_THREAD_DEFAULT
from sentry.eventstore.models import GroupEvent
from sentry.integrations.repository import get_default_issue_alert_repository
from sentry.integrations.repository.base import NotificationMessageValidationError
Expand All @@ -23,6 +24,7 @@
)
from sentry.integrations.slack.utils import get_channel_id
from sentry.models.integrations.integration import Integration
from sentry.models.options.organization_option import OrganizationOption
from sentry.models.rule import Rule
from sentry.notifications.additional_attachment_manager import get_additional_attachment
from sentry.rules.actions import IntegrationEventAction
Expand Down Expand Up @@ -130,6 +132,11 @@ def send_notification(event: GroupEvent, futures: Sequence[RuleFuture]) -> None:
features.has(
"organizations:slack-thread-issue-alert", event.group.project.organization
)
and OrganizationOption.objects.get_value(
organization=self.project.organization,
key="sentry:issue_alerts_thread_flag",
default=ISSUE_ALERTS_THREAD_DEFAULT,
)
and rule_action_uuid
and rule_id
):
Expand Down

0 comments on commit 1a2ac78

Please sign in to comment.