From ab3045f80e63e7dee5a1912ea6bb60b6dec0c14f Mon Sep 17 00:00:00 2001 From: mixelburg <52622705+mixelburg@users.noreply.github.com> Date: Wed, 18 Feb 2026 21:59:16 +0200 Subject: [PATCH] fix: handle undefined monitor name in PagerDuty notification summary (#6977) Co-authored-by: Maks Pikov Co-authored-by: Frank Elsinga --- .github/workflows/npm-update.yml | 2 +- server/notification-providers/pagerduty.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/npm-update.yml b/.github/workflows/npm-update.yml index 8d5853a90..1c79b44b1 100644 --- a/.github/workflows/npm-update.yml +++ b/.github/workflows/npm-update.yml @@ -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 diff --git a/server/notification-providers/pagerduty.js b/server/notification-providers/pagerduty.js index f816e42c2..c6f60b624 100644 --- a/server/notification-providers/pagerduty.js +++ b/server/notification-providers/pagerduty.js @@ -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", }, };