Compare commits

..

No commits in common. "main" and "1.1.0" have entirely different histories.
main ... 1.1.0

1 changed files with 3 additions and 2 deletions

View File

@ -11,13 +11,14 @@ import (
const (
messageTemplate = "\U0001f6a8" +
` **New alerts:** @room{{ range .Alerts }}
` **Alerts for group "_{{ .GroupKey }}_":**{{ range .Alerts }}
` + "\u2022" + ` {{ if eq .Status "` + StatusResolved + `" }}` + "\u2705" +
`{{ else }}{{ with .Labels.severity }}{{ if eq . "critical" }}` + "\U0001f525" +
`{{ else if eq . "warning" }}` + "\U0001f4e2" +
`{{ else }}` + "\U0001f514" +
`{{ end }}{{ else }}` + "\U0001f514" +
`{{ end }}{{ end }} {{ .Annotations.description }}{{ end }}`
`{{ end }}{{ end }} {{ .Annotations.description }}{{ end }}
@room`
)
func (s Server) handleWebhook(w http.ResponseWriter, r *http.Request) {