Skip to content

Commit

Permalink
Output a better error message (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
djeebus authored Mar 28, 2024
1 parent ba8549d commit b5eff50
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/msg/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func (m *Message) BuildComment(ctx context.Context) string {
var sb strings.Builder
sb.WriteString("# Kubechecks Report\n")

updateWritten := false
for _, appName := range names {
if m.isDeleted(appName) {
continue
Expand Down Expand Up @@ -192,6 +193,12 @@ func (m *Message) BuildComment(ctx context.Context) string {
sb.WriteString("</summary>\n\n")
sb.WriteString(strings.Join(checkStrings, "\n\n---\n\n"))
sb.WriteString("</details>")

updateWritten = true
}

if !updateWritten {
sb.WriteString("No changes")
}

return sb.String()
Expand Down

0 comments on commit b5eff50

Please sign in to comment.