From 54d74e973b0ac552df5858b6cd36cd68301dc44f Mon Sep 17 00:00:00 2001 From: sapphi-red Date: Fri, 11 Feb 2022 21:10:03 +0900 Subject: [PATCH] Add alert status --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 9fefc21..ab1460e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,7 +16,9 @@ function doPost(e: GoogleAppsScript.Events.DoPost) { } function alertToMessage(alert: Alert) { - const title = `## ${alert.labels.alertname ?? 'Blank alert name'}` + const title = `## [${alert.status}] ${ + alert.labels.alertname ?? 'Blank alert name' + }` const message = alert.annotations.message ?? 'Blank message' const link = alert.dashboardURL !== '' ? `[dashboard link](${alert.dashboardURL})` : ''