Skip to content

Commit

Permalink
fix empty checking logic
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes committed Jan 25, 2024
1 parent 8ecc62e commit 7750ad3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/utils/pr_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ func ReportInitialJobsStatus(cr *CommentReporter, jobs []orchestrator.Job) error
commentId := cr.CommentId
message := ""
if len(jobs) == 0 {
message = message + ":construction_worker: No projects impacted"
} else {
message = message + ":construction_worker: The following projects are impacted\n\n"
for _, job := range jobs {
message = message + fmt.Sprintf(""+
Expand All @@ -38,8 +40,6 @@ func ReportInitialJobsStatus(cr *CommentReporter, jobs []orchestrator.Job) error
"<!-- PROJECTHOLDEREND %v -->\n"+
"", job.ProjectName, job.ProjectName, job.ProjectName)
}
} else {
message = message + ":construction_worker: No projects impacted"
}
err := prService.EditComment(prNumber, commentId, message)
return err
Expand Down

0 comments on commit 7750ad3

Please sign in to comment.