Skip to content

Commit 0b8109d

Browse files
TonybynMp4claude
andcommitted
fix(gitlab): keep the pipeline check when a stage comes back without a name
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 0f895cf commit 0b8109d

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,17 @@ describe("decodePipelineStageChecksJson", () => {
392392
),
393393
),
394394
).toBe(null);
395+
expect(
396+
expectSuccess(
397+
decodePipelineStageChecksJson(
398+
stagesJson([
399+
{ name: "build", status: "success" },
400+
{ name: null, status: "failed" },
401+
]),
402+
"https://gitlab.com",
403+
),
404+
),
405+
).toBe(null);
395406
expect(
396407
expectSuccess(
397408
decodePipelineStageChecksJson(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ export function decodePipelineStageChecksJson(
385385
if (
386386
(decoded.success.errors?.length ?? 0) > 0 ||
387387
pipeline?.stages?.pageInfo?.hasNextPage === true ||
388-
pipeline?.stages?.nodes.includes(null) === true
388+
pipeline?.stages?.nodes.some((stage) => stage === null || trimmed(stage.name) === null) === true
389389
) {
390390
return Result.succeed(null);
391391
}

0 commit comments

Comments
 (0)