Skip to content

Commit 6b71b29

Browse files
authored
Merge pull request #1369 from hongweiliu17/comment_improvement
fix: create comment for all integration test status if no commitStatus
2 parents fca805f + d50392a commit 6b71b29

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

status/reporter_github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ func (csu *CommitStatusUpdater) UpdateStatus(ctx context.Context, report TestRep
481481
}
482482
// Create a comment when integration test is neither pending nor inprogress since comment for pending/inprogress is less meaningful and there is commitStatus for all statuses
483483
_, isPullRequest := csu.snapshot.GetAnnotations()[gitops.PipelineAsCodePullRequestAnnotation]
484-
if report.Status != intgteststat.IntegrationTestStatusPending && report.Status != intgteststat.IntegrationTestStatusInProgress && isPullRequest {
484+
if isPullRequest {
485485
statusCode, err := csu.updateStatusInComment(ctx, report)
486486
if err != nil {
487487
csu.logger.Error(err, "failed to update comment", "snapshot.NameSpace", csu.snapshot.Namespace, "snapshot.Name", csu.snapshot.Name, "scenarioName", report.ScenarioName)

status/reporter_gitlab.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ func (r *GitLabReporter) ReportStatus(ctx context.Context, report TestReport) (i
322322

323323
// Create a note when integration test is neither pending nor inprogress since comment for pending/inprogress is less meaningful
324324
_, isMergeRequest := r.snapshot.GetAnnotations()[gitops.PipelineAsCodePullRequestAnnotation]
325-
if report.Status != intgteststat.IntegrationTestStatusPending && report.Status != intgteststat.IntegrationTestStatusInProgress && report.Status != intgteststat.SnapshotCreationFailed && isMergeRequest {
325+
if isMergeRequest {
326326
statusCode, err := r.updateStatusInComment(report)
327327
if err != nil {
328328
return statusCode, err

0 commit comments

Comments
 (0)