Skip to content

Commit

Permalink
Add alert status
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Feb 11, 2022
1 parent 9e49234 commit 54d74e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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})` : ''
Expand Down

0 comments on commit 54d74e9

Please sign in to comment.