Skip to content

Commit 3989f5a

Browse files
maria-rcksLucenx9
andauthored
fix(gitlab): keep scheduled pipelines pending (#25195)
Co-authored-by: Simone <[email protected]>
1 parent 7cdbb8e commit 3989f5a

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎packages/source-control-gitlab/src/server/gitLabMergeRequestJson.test.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,14 @@ describe("decodeMergeRequestDetailJson", () => {
210210
expect(behind({ diverged_commits_count: null })).toBeUndefined();
211211
});
212212

213+
it.each(["scheduled", " SCHEDULED "])("keeps a delayed pipeline pending: %s", (status) => {
214+
const detail = expectSuccess(
215+
decodeMergeRequestDetailJson(detailJson({ head_pipeline: { status } })),
216+
);
217+
218+
expect(detail.checks[0]?.status).toBe("pending");
219+
});
220+
213221
it("maps a pipeline waiting on a person to neutral, not failure", () => {
214222
const detail = expectSuccess(
215223
decodeMergeRequestDetailJson(detailJson({ head_pipeline: { status: "manual" } })),

‎packages/source-control-gitlab/src/server/gitLabMergeRequestJson.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ function toPipelineStatus(value: string | null | undefined): PullRequestCheckSta
257257
case "skipped":
258258
return "skipped";
259259
case "manual":
260-
case "scheduled":
261260
return "neutral";
262261
default:
263262
return "pending";

0 commit comments

Comments
 (0)