Skip to content

Commit

Permalink
don't add comment if there are no notifications to send
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksnyder committed Sep 16, 2020
1 parent 2462fdf commit 9a9d986
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down

0 comments on commit 9a9d986

Please sign in to comment.