fix: handle undefined monitor name in PagerDuty notification summary (#6977)

Co-authored-by: Maks Pikov <mixelburg@users.noreply.github.com>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
mixelburg
2026-02-18 19:59:16 +00:00
committed by GitHub
co-authored by Maks Pikov Frank Elsinga
parent 02e082d0a7
commit ab3045f80e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -85,13 +85,13 @@ class PagerDuty extends NotificationProvider {
headers: { "Content-Type": "application/json" },
data: {
payload: {
summary: `[${title}] [${monitorInfo.name}] ${body}`,
summary: monitorInfo.name ? `[${title}] [${monitorInfo.name}] ${body}` : `[${title}] ${body}`,
severity: notification.pagerdutyPriority || "warning",
source: monitorUrl,
},
routing_key: notification.pagerdutyIntegrationKey,
event_action: eventAction,
dedup_key: "Uptime Kuma/" + monitorInfo.id,
dedup_key: monitorInfo.id ? "Uptime Kuma/" + monitorInfo.id : "Uptime Kuma/test",
},
};