From 9a9d98641cc53b6a8adc1b40d979658e1f804048 Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Tue, 15 Sep 2020 22:05:24 -0700 Subject: [PATCH] don't add comment if there are no notifications to send --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 5f19f65..49a1631 100644 --- a/main.go +++ b/main.go @@ -159,6 +159,10 @@ func commentOnGitHubPullRequest(o *options, prNodeID string) func(map[string][]s } if id == "" { + if len(notifs) == 0 { + fmt.Fprintln(verbose, "not adding a comment because there are no notifications to send") + return nil + } return addComment(prNodeID, comment.String()) }