* Fix bug#37225

This commit is contained in:
zenggang
2023-09-04 03:19:14 +00:00
parent d427c7664c
commit 9dedb019b1
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -145,7 +145,7 @@ class job extends control
$this->loadModel('action')->create('job', $jobID, 'created');
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $jobID));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse', "repoID={$this->post->repo}")));
}
$this->loadModel('ci');
@@ -380,7 +380,7 @@ class job extends control
public function exec($jobID)
{
$job = $this->job->getByID($jobID);
if(strtolower($job->engine) == 'gitlab' and (!isset($job->reference) or !$job->reference)) return $this->send(array('result' => 'fail', 'message' => $this->lang->job->setReferenceTips, 'locate' => inlink('edit', "id=$jobID")));
//if(strtolower($job->engine) == 'gitlab' and (!isset($job->reference) or !$job->reference)) return $this->send(array('result' => 'fail', 'message' => $this->lang->job->setReferenceTips, 'locate' => inlink('edit', "id=$jobID")));
$compile = $this->job->exec($jobID);
if(dao::isError()) return $this->send(array('result' => 'fail', 'callback' => sprintf('zui.Modal.alert("%s");', dao::getError())));
+1 -1
View File
@@ -573,7 +573,7 @@ class jobModel extends model
$pipeline = json_decode($job->pipeline);
$pipelineParams = new stdclass;
$pipelineParams->ref = $pipeline->reference;
$pipelineParams->ref = $pipeline->reference ? $pipeline->reference : 'master';
$customParams = json_decode($job->customParam);
$variables = array();