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 21:59:16 +02:00
committed by GitHub
parent 02e082d0a7
commit ab3045f80e
2 changed files with 3 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ name: NPM Update
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # Run daily at midnight UTC
- cron: "0 0 * * *" # Run daily at midnight UTC
permissions:
contents: write

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",
},
};