From bafa7ee76e71189f44208ba03b8e33cf4bf3695c Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Sat, 16 Dec 2023 14:52:36 +0800 Subject: [PATCH] * Adjust pipeline check after api create mr. --- module/mr/model.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/mr/model.php b/module/mr/model.php index f0e201e210..85b461df9e 100644 --- a/module/mr/model.php +++ b/module/mr/model.php @@ -244,9 +244,10 @@ class mrModel extends model { if($MR->hasNoConflict == '0' && $MR->mergeStatus == 'can_be_merged' && $MR->jobID) { - $extraParam = array('sourceBranch' => $MR->sourceBranch, 'targetBranch' => $MR->targetBranch); - $pipeline = $this->loadModel('job')->exec($MR->jobID, $extraParam); - $newMR = new stdClass(); + $pipeline = $this->loadModel('job')->exec($MR->jobID, array('sourceBranch' => $MR->sourceBranch, 'targetBranch' => $MR->targetBranch)); + if(!$pipeline) return false; + + $newMR = new stdClass(); if(!empty($pipeline->queue)) { $compile = $this->loadModel('compile')->getByQueue((int)$pipeline->queue);