mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-03 02:57:01 +00:00
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:
2
.github/workflows/npm-update.yml
vendored
2
.github/workflows/npm-update.yml
vendored
@@ -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
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user