* [bug#55486] adjust repo attribute for gitlab.

This commit is contained in:
caoyanyi
2024-09-23 13:33:50 +08:00
committed by 田淑杰
parent 5a19c872e1
commit 9d214399bc
+2 -2
View File
@@ -1137,7 +1137,7 @@ class gitlabModel extends model
/* Return an empty array if where is one existing webhook. */
if($this->isWebhookExists($repo, $hook->url)) return true;
$result = $this->apiCreateHook($repo->gitService, (int)$repo->project, $hook);
$result = $this->apiCreateHook((int)$repo->serviceHost, (int)$repo->serviceProject, $hook);
if(!empty($result->id)) return true;
@@ -1155,7 +1155,7 @@ class gitlabModel extends model
*/
public function isWebhookExists(object $repo, string $url = ''): bool
{
$hookList = $this->apiGetHooks($repo->gitService, (int)$repo->project);
$hookList = $this->apiGetHooks((int)$repo->serviceHost, (int)$repo->serviceProject);
foreach($hookList as $hook)
{
if(empty($hook->url)) continue;