Skip to content

Commit 658e9d4

Browse files
theakshaypantchmouel
authored andcommitted
fix(gitlab): map skipped status correctly
Use gitlab.Skipped state instead of gitlab.Canceled when the conclusion is ConclusionSkipped, so that GitLab pipelines show the correct skipped status. Also update the skip CI path in the sinker to use ConclusionSkipped instead of ConclusionNeutral. Signed-off-by: Akshay Pant <akpant@redhat.com>
1 parent 3169e83 commit 658e9d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/adapter/sinker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func (s *sinker) setupClient(ctx context.Context, repo *v1alpha1.Repository) err
159159
func (s *sinker) createSkipCIStatus(ctx context.Context) error {
160160
statusOpts := status.StatusOpts{
161161
Status: "completed",
162-
Conclusion: status.ConclusionNeutral,
162+
Conclusion: status.ConclusionSkipped,
163163
Title: "CI Skipped",
164164
Summary: fmt.Sprintf("%s - CI has been skipped", s.pacInfo.ApplicationName),
165165
Text: "Commit contains a skip CI command. Use /test or /retest to manually trigger CI if needed.",

pkg/provider/gitlab/gitlab.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ func (v *Provider) CreateStatus(ctx context.Context, event *info.Event, statusOp
308308

309309
switch statusOpts.Conclusion {
310310
case providerstatus.ConclusionSkipped:
311-
state = gitlab.Canceled
311+
state = gitlab.Skipped
312312
statusOpts.Title = "skipped validating this commit"
313313
case providerstatus.ConclusionNeutral:
314314
state = gitlab.Canceled

0 commit comments

Comments
 (0)