Skip to content

Commit

Permalink
Merge branch 'main' into minor-workflow-execution-render-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rajesh-jonnalagadda authored Nov 10, 2024
2 parents 11f05aa + f8a19a0 commit 94e15be
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions keep/providers/pagerduty_provider/pagerduty_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,9 @@ def _format_alert(
data = actual_event.get("data", {})
url = data.pop("self", data.pop("html_url", None))
# format status and severity to Keep format
status = PagerdutyProvider.STATUS_MAP.get(
data.pop("status"), AlertStatus.FIRING
)
status = PagerdutyProvider.STATUS_MAP.get(data.pop("status", "firing"))
priority_summary = (data.get("priority", {}) or {}).get("summary")
priority = PagerdutyProvider.SEVERITIES_MAP.get(
priority_summary, AlertSeverity.INFO
)
priority = PagerdutyProvider.SEVERITIES_MAP.get(priority_summary, "P4")
last_received = data.pop("created_at")
name = data.pop("title")
service = data.pop("service", {}).get("summary", "unknown")
Expand Down

0 comments on commit 94e15be

Please sign in to comment.