* Modify gitlab to git service in repo module.

This commit is contained in:
liyuchun
2022-07-14 00:53:13 +00:00
parent 202541b418
commit 6102e2df6a
4 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -1203,7 +1203,7 @@ class gitlabModel extends model
/* Return an empty array if where is one existing webhook. */
if($this->isWebhookExists($repo, $hook->url)) return array();
$result = $this->apiCreateHook($repo->gitlab, $repo->project, $hook);
$result = $this->apiCreateHook($repo->gitService, $repo->project, $hook);
if(!empty($result->id)) return true;
return false;
@@ -1218,7 +1218,7 @@ class gitlabModel extends model
*/
public function isWebhookExists($repo, $url = '')
{
$hookList = $this->apiGetHooks($repo->gitlab, $repo->project);
$hookList = $this->apiGetHooks($repo->gitService, $repo->project);
foreach($hookList as $hook)
{
if($hook->url == $url) return true;