* Fix save gitlab repo bug.

This commit is contained in:
Guanxiying
2021-04-14 15:00:36 +08:00
parent 2b760a4d18
commit 061bef299f
+17 -5
View File
@@ -242,12 +242,14 @@ class repoModel extends model
->join('product', ',')
->get();
$data->path = sprintf($this->config->repo->gitlab->apiPath, $data->gitlabHost, $data->gitlabProject);
unset($data->gitlabHost);
unset($data->gitlabToken);
unset($data->gitlabProject);
if($this->post->SCM == 'Gitlab')
{
$data->path = sprintf($this->config->repo->gitlab->apiPath, $data->gitlabHost, $this->post->gitlabProject);
unset($data->gitlabHost);
unset($data->gitlabToken);
unset($data->gitlabProject);
}
$data->acl = empty($data->acl) ? '' : json_encode($data->acl);
@@ -291,6 +293,16 @@ class repoModel extends model
->skipSpecial('path,client,account,password')
->join('product', ',')
->get();
if($this->post->SCM == 'Gitlab')
{
$data->path = sprintf($this->config->repo->gitlab->apiPath, $data->gitlabHost, $this->post->gitlabProject);
unset($data->gitlabHost);
unset($data->gitlabToken);
unset($data->gitlabProject);
}
$data->acl = empty($data->acl) ? '' : json_encode($data->acl);
if($data->SCM == 'Subversion' and $data->path != $repo->path)