Merge branch 'jihu' of https://gitlab.zcorp.cc/easycorp/zentaopms into jihu
This commit is contained in:
@@ -646,16 +646,16 @@ class gitlabModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get account name in zentao sys.
|
||||
* Get account in zentaopms.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $userID
|
||||
* @access public
|
||||
* @return string|false
|
||||
*/
|
||||
public function getAccountName($gitlabID, $userID)
|
||||
public function getAccount($gitlabID, $userID)
|
||||
{
|
||||
return $this->dao->select("account")
|
||||
return $this->dao->select('account')
|
||||
->from(TABLE_OAUTH)
|
||||
->where('providerType')->eq('gitlab')
|
||||
->andwhere('providerID')->eq($gitlabID)
|
||||
|
||||
@@ -232,8 +232,7 @@ class repoModel extends model
|
||||
|
||||
if($this->post->SCM == 'Gitlab')
|
||||
{
|
||||
$this->loadModel("gitlab")->initLabels($this->post->gitlabHost, $this->post->gitlabProject);
|
||||
$this->loadModel("gitlab")->createAssociat($this->post->product, $this->post->gitlabHost, $this->post->gitlabProject);
|
||||
$this->loadModel("gitlab")->saveRelation($this->post->product, $this->post->gitlabHost, $this->post->gitlabProject);
|
||||
|
||||
/* create webhook for zentao */
|
||||
$this->loadModel("gitlab")->createWebhook($this->post->product, $this->post->gitlabHost, $this->post->gitlabProject);
|
||||
@@ -300,9 +299,8 @@ class repoModel extends model
|
||||
$this->dao->delete()->from(TABLE_REPOFILES)->where('repo')->eq($id)->exec();
|
||||
if($repo->SCM == 'Gitlab')
|
||||
{
|
||||
$this->loadModel("gitlab")->initLabels($this->post->gitlabHost, $this->post->gitlabProject);
|
||||
|
||||
$this->loadModel("gitlab")->createWebhook($this->post->product, $this->post->gitlabHost, $this->post->gitlabProject);
|
||||
$this->loadModel("gitlab")->saveRelation($this->post->product, $this->post->gitlabHost, $this->post->gitlabProject);
|
||||
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user