From aabe52b048f988dd0e76c0fca521efc6bf5cb673 Mon Sep 17 00:00:00 2001 From: "joe.lombrozo" Date: Thu, 28 Mar 2024 13:56:28 -0400 Subject: [PATCH] Output a better error message --- pkg/msg/message.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/msg/message.go b/pkg/msg/message.go index 245044c1..9b5730ef 100644 --- a/pkg/msg/message.go +++ b/pkg/msg/message.go @@ -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 @@ -192,6 +193,12 @@ func (m *Message) BuildComment(ctx context.Context) string { sb.WriteString("\n\n") sb.WriteString(strings.Join(checkStrings, "\n\n---\n\n")) sb.WriteString("") + + updateWritten = true + } + + if !updateWritten { + sb.WriteString("No changes") } return sb.String()