Skip to content

Commit

Permalink
💬 [patch] Update Slack & Teams report message (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pohfy123 authored Sep 8, 2021
1 parent 7d9f8e7 commit 24020df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions internal/reporter/msteams/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,14 @@ func (r *reporter) makeDeploymentQueueReport(comp *internal.ComponentUpgradeRepo
{{- end }}
<br/><b>Run:</b>{{ if .PullRequestComponent }} #{{ .Runs }}{{ else if .IsReverify }} Reverify {{ else }} #{{ .Runs }}{{ end }}
<br/><b>Queue:</b> {{ .Name }}
<br/><b>Components</b>
{{- if .Components }}
<br/><b>Components:</b>
{{- range .Components }}
<li><b>- Name:</b> {{ .Name }}</li>
<li><b>&nbsp;&nbsp;Version:</b> {{ if .Image.Tag }}{{ .Image.Tag }}{{ else }}<code>no stable/active image tag found, using from values file</code>{{ end }}</li>
<li><b>&nbsp;&nbsp;Repository:</b> {{ if .Image.Repository }}{{ .Image.Repository }}{{ else }}<code>no stable/active image repository found, using from values file</code>{{ end }}</li>
{{- end }}
{{- end }}
<br/><b>Owner:</b> {{ .TeamName }}
<br/><b>Namespace:</b> {{ .Namespace }}
{{- if eq .Status 0 }}
Expand Down Expand Up @@ -376,7 +378,7 @@ func (r *reporter) makeImageMissingListReport(images []s2hv1.Image, reason strin
}

var message = `
<b>Image Missing List</b>
<b>Image Missing List:</b>
{{- range .Images }}
<li>{{ .Repository }}:{{ .Tag }}</li>
` + reasonMsg + `
Expand Down
8 changes: 5 additions & 3 deletions internal/reporter/slack/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,14 @@ func (r *reporter) makeDeploymentQueueReport(comp *internal.ComponentUpgradeRepo
{{- end }}
*Run:*{{ if .PullRequestComponent }} #{{ .Runs }}{{ else if .IsReverify }} Reverify {{ else }} #{{ .Runs }}{{ end }}
*Queue:* {{ .Name }}
*Components*
{{- if .Components }}
*Components:*
{{- range .Components }}
>- *Name:* {{ .Name }}
> *Version:* {{ if .Image.Tag }}{{ .Image.Tag }}{{ else }}` + "`no stable/active image tag found, using from values file`" + `{{ end }}
> *Repository:* {{ if .Image.Repository }}{{ .Image.Repository }}{{ else }}` + "`no stable/active image repository found, using from values file`" + `{{ end }}
{{- end }}
{{- end }}
*Owner:* {{ .TeamName }}
*Namespace:* {{ .Namespace }}
{{- if eq .Status 0 }}
Expand Down Expand Up @@ -373,9 +375,9 @@ func (r *reporter) makeImageMissingListReport(images []s2hv1.Image, reason strin
}

var message = `
*Image Missing List*
*Image Missing List:*
{{- range .Images }}
- {{ .Repository }}:{{ .Tag }}
> - {{ .Repository }}:{{ .Tag }}
` + reasonMsg + `
{{- end }}
`
Expand Down

0 comments on commit 24020df

Please sign in to comment.