fix: handle undefined monitor name in PagerDuty notification summary#6977
Conversation
|
Hello and thanks for lending a paw to Uptime Kuma! 🐻👋 |
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where PagerDuty notifications show [undefined] in the alert title when the monitor name is not available, such as when using the test button. The fix adds conditional checks to only include the monitor name and ID when they are defined.
Changes:
- Conditionally includes monitor name in PagerDuty alert summary to avoid displaying
[undefined] - Handles undefined monitor ID in dedup_key field by using "Uptime Kuma/test" as fallback
|
@mixelburg congrats on your first contribution to Uptime Kuma! 🐻 |
Fixes #2315
When the monitor name is undefined (e.g. when using the test button), the PagerDuty alert summary shows
[undefined]in the title. This change conditionally includes the monitor name bracket only when it's available.Also handles the
dedup_keyfield to avoidUptime Kuma/undefinedwhen monitor ID is not set.