Skip to content

Commit

Permalink
chore: comment when there's an error
Browse files Browse the repository at this point in the history
  • Loading branch information
vrivellino committed Jan 26, 2024
1 parent d446625 commit ba94f5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/process_event/code_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ func ProcessCodeChange(eventInfo webhook.EventInfo, devMode bool, wg *sync.WaitG
markdownStart += " compared to live state\n"
markdownStart += "\n" + tStr + "\n"
cMarkdown.Preamble = markdownStart
if changeCount == 0 {
// if there are no change, don't comment (but clear out any existing comments)
if changeCount == 0 && firstError == "" {
// if there are no changes or warnings, don't comment (but clear out any existing comments)
_, _ = github.Comment(ctx, eventInfo.RepoOwner, eventInfo.RepoName, eventInfo.PrNum, eventInfo.Sha, []string{})
} else {
_, _ = github.Comment(ctx, eventInfo.RepoOwner, eventInfo.RepoName, eventInfo.PrNum, eventInfo.Sha, cMarkdown.String())
Expand Down

0 comments on commit ba94f5f

Please sign in to comment.