-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(np): Updates IssueNotificationData, render logic to correctly extract action data #111689
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
Changes from all commits
5100c8a
48053bf
4c92dfd
bce1104
202e198
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from sentry import eventstore | ||
| from sentry.models.group import Group | ||
| from sentry.notifications.platform.renderer import NotificationRenderer | ||
| from sentry.notifications.platform.slack.provider import SlackRenderable | ||
|
|
@@ -26,14 +27,16 @@ def render[DataT: NotificationData]( | |
| group = Group.objects.get_from_cache(id=data.group_id) | ||
| event = None | ||
| if data.event_id: | ||
| event = group.get_latest_event() | ||
| event = eventstore.backend.get_event_by_id(group.project.id, data.event_id) | ||
|
|
||
| tags = data.rule.data.get("tags", None) or None | ||
| blocks_dict = SlackIssuesMessageBuilder( | ||
| group=group, | ||
|
sentry[bot] marked this conversation as resolved.
|
||
| event=event, | ||
| tags=data.tags or None, | ||
| tags=set(tag.strip() for tag in tags.split(",")) if tags else None, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tag parsing drops empty-string filter from set comprehensionLow Severity The old tag parsing in the factory used |
||
| rules=[data.rule.to_rule()] if data.rule else None, | ||
| notes=data.notes or None, | ||
| notes=data.rule.data.get("notes", None) or None, | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| link_to_event=True, | ||
| ).build(notification_uuid=data.notification_uuid) | ||
|
|
||
| return SlackRenderable( | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.