Skip to content

Commit 5f5514e

Browse files
committed
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 f541028 commit 5f5514e

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
@@ -158,7 +158,7 @@ func (s *sinker) setupClient(ctx context.Context, repo *v1alpha1.Repository) err
158158
func (s *sinker) createSkipCIStatus(ctx context.Context) error {
159159
statusOpts := provider.StatusOpts{
160160
Status: "completed",
161-
Conclusion: "neutral",
161+
Conclusion: "skipped",
162162
Title: "CI Skipped",
163163
Summary: fmt.Sprintf("%s - CI has been skipped", s.pacInfo.ApplicationName),
164164
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
@@ -286,7 +286,7 @@ func (v *Provider) CreateStatus(ctx context.Context, event *info.Event, statusOp
286286
}
287287
switch statusOpts.Conclusion {
288288
case "skipped":
289-
statusOpts.Conclusion = "canceled"
289+
statusOpts.Conclusion = "skipped"
290290
statusOpts.Title = "skipped validating this commit"
291291
case "neutral":
292292
statusOpts.Conclusion = "canceled"

0 commit comments

Comments
 (0)