Skip to content

Commit

Permalink
Merge branch 'main' into 3899-feature-incident-link-from-table
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren authored Mar 6, 2025
2 parents 2134f39 + fd33881 commit 1cbb5b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions keep/providers/sentry_provider/sentry_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SentryProviderAuthConfig:
"description": "Sentry API URL",
"hint": "https://sentry.io/api/0 (see https://docs.sentry.io/api/)",
"sensitive": False,
"validation": "https_url"
"validation": "https_url",
},
default="https://sentry.io/api/0",
)
Expand Down Expand Up @@ -239,12 +239,12 @@ def _format_alert(
status = SentryProvider.STATUS_MAP.get(status, AlertStatus.FIRING)

# https://docs.sentry.io/product/integrations/integration-platform/webhooks/issue-alerts/#dataeventissue_url
url = event_data.pop("url", None)
url = event_data.pop("url", event.get("url"))
if "web_url" in event_data:
url = event_data["web_url"]
elif "issue_url" in event_data:
url = event_data["issue_url"]
elif "url" in tags_as_dict:
elif "url" in tags_as_dict and not url:
url = tags_as_dict["url"]

exceptions = event_data.get("exception", {}).get("values", [])
Expand Down

0 comments on commit 1cbb5b1

Please sign in to comment.