Skip to content

Commit cf89c5a

Browse files
authored
MergeRequestAcceptor - resolve another special case for running pipeline (#199)
1 parent 0d47590 commit cf89c5a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/src/MergeRequestAcceptor.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,12 @@ export const acceptMergeRequest = async (
325325
}
326326
}
327327

328-
if (mergeRequestInfo.detailed_merge_status === DetailedMergeStatus.CiStillRunning) {
328+
if (
329+
mergeRequestInfo.detailed_merge_status === DetailedMergeStatus.CiStillRunning ||
330+
// I don't understand why the merge status is `ci_must_pass` instead of `ci_still_running`, but it is as it is. Maybe more values for currentPipeline.status should be added here, but let's try it in this way for now.
331+
(mergeRequestInfo.detailed_merge_status === DetailedMergeStatus.CiMustPass &&
332+
currentPipeline.status === PipelineStatus.Running)
333+
) {
329334
await setBotLabels(gitlabApi, mergeRequestInfo, [BotLabels.WaitingForPipeline]);
330335
return 'continue';
331336
}

0 commit comments

Comments
 (0)