* Create webhook for each products.

This commit is contained in:
dingguodong
2021-06-18 10:51:31 +08:00
parent 019e946496
commit 51b2a70308
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -237,9 +237,12 @@ class gitlabModel extends model
*/
public function createWebhook($products, $gitlabID, $projectID)
{
$webhook = sprintf($this->config->gitlab->zentaoApiWebhookUrl, commonModel::getSysURL(), $gitlabID);
$response = $this->apiCreateHook($gitlabID, $projectID, $webhook, $this->config->gitlab->zentaoApiWebhookToken);
return $response;
foreach($products as $index => $product)
{
$webhook = sprintf($this->config->gitlab->zentaoApiWebhookUrl, commonModel::getSysURL(), $product, $gitlabID, $projectID);
$response = $this->apiCreateHook($gitlabID, $projectID, $webhook, $this->config->gitlab->zentaoApiWebhookToken);
}
return true;
}
/**