@@ -170,12 +170,12 @@ func RunJobs(jobs []orchestrator.Job, prService ci.PullRequestService, orgServic
170
170
func reportPolicyError (projectName string , command string , requestedBy string , reporter reporting.Reporter ) string {
171
171
msg := fmt .Sprintf ("User %s is not allowed to perform action: %s. Check your policies :x:" , requestedBy , command )
172
172
if reporter .SupportsMarkdown () {
173
- _ , _ , err := reporter .Report (msg , coreutils .AsCollapsibleComment (fmt .Sprintf ("Policy violation for <b>%v - %v</b>" , projectName , command ), false ))
173
+ err := reporter .Report (msg , coreutils .AsCollapsibleComment (fmt .Sprintf ("Policy violation for <b>%v - %v</b>" , projectName , command ), false ))
174
174
if err != nil {
175
175
log .Printf ("Error publishing comment: %v" , err )
176
176
}
177
177
} else {
178
- _ , _ , err := reporter .Report (msg , coreutils .AsComment (fmt .Sprintf ("Policy violation for %v - %v" , projectName , command )))
178
+ err := reporter .Report (msg , coreutils .AsComment (fmt .Sprintf ("Policy violation for %v - %v" , projectName , command )))
179
179
if err != nil {
180
180
log .Printf ("Error publishing comment: %v" , err )
181
181
}
@@ -311,7 +311,7 @@ func run(command string, job orchestrator.Job, policyChecker policy.Checker, org
311
311
preformattedMessaged = append (preformattedMessaged , fmt .Sprintf (" %v" , message ))
312
312
}
313
313
planReportMessage = planReportMessage + strings .Join (preformattedMessaged , "<br>" )
314
- _ , _ , err = reporter .Report (planReportMessage , planPolicyFormatter )
314
+ err = reporter .Report (planReportMessage , planPolicyFormatter )
315
315
316
316
if err != nil {
317
317
log .Printf ("Failed to report plan. %v" , err )
@@ -320,7 +320,7 @@ func run(command string, job orchestrator.Job, policyChecker policy.Checker, org
320
320
log .Printf (msg )
321
321
return nil , msg , fmt .Errorf (msg )
322
322
} else {
323
- _ , _ , err := reporter .Report ("Terraform plan validation checks succeeded :white_check_mark:" , planPolicyFormatter )
323
+ err := reporter .Report ("Terraform plan validation checks succeeded :white_check_mark:" , planPolicyFormatter )
324
324
if err != nil {
325
325
log .Printf ("Failed to report plan. %v" , err )
326
326
}
@@ -496,12 +496,12 @@ func reportApplyMergeabilityError(reporter reporting.Reporter) string {
496
496
log .Println (comment )
497
497
498
498
if reporter .SupportsMarkdown () {
499
- _ , _ , err := reporter .Report (comment , coreutils .AsCollapsibleComment ("Apply error" , false ))
499
+ err := reporter .Report (comment , coreutils .AsCollapsibleComment ("Apply error" , false ))
500
500
if err != nil {
501
501
log .Printf ("error publishing comment: %v\n " , err )
502
502
}
503
503
} else {
504
- _ , _ , err := reporter .Report (comment , coreutils .AsComment ("Apply error" ))
504
+ err := reporter .Report (comment , coreutils .AsComment ("Apply error" ))
505
505
if err != nil {
506
506
log .Printf ("error publishing comment: %v\n " , err )
507
507
}
@@ -518,7 +518,7 @@ func reportTerraformPlanOutput(reporter reporting.Reporter, projectId string, pl
518
518
formatter = coreutils .GetTerraformOutputAsComment ("Plan output" )
519
519
}
520
520
521
- _ , _ , err := reporter .Report (plan , formatter )
521
+ err := reporter .Report (plan , formatter )
522
522
if err != nil {
523
523
log .Printf ("Failed to report plan. %v" , err )
524
524
}
@@ -533,7 +533,7 @@ func reportPlanSummary(reporter reporting.Reporter, summary string) {
533
533
formatter = coreutils .AsComment ("Plan summary" )
534
534
}
535
535
536
- _ , _ , err := reporter .Report ("\n " + summary , formatter )
536
+ err := reporter .Report ("\n " + summary , formatter )
537
537
if err != nil {
538
538
log .Printf ("Failed to report plan summary. %v" , err )
539
539
}
@@ -543,7 +543,7 @@ func reportEmptyPlanOutput(reporter reporting.Reporter, projectId string) {
543
543
identityFormatter := func (comment string ) string {
544
544
return comment
545
545
}
546
- _ , _ , err := reporter .Report ("→ No changes in terraform output for " + projectId , identityFormatter )
546
+ err := reporter .Report ("→ No changes in terraform output for " + projectId , identityFormatter )
547
547
// suppress the comment (if reporter is suppressible)
548
548
reporter .Suppress ()
549
549
if err != nil {
0 commit comments