* Fix gitlab api hook url.

This commit is contained in:
Guan Xiying
2021-06-18 10:41:15 +08:00
parent ca563c3a5f
commit 019e946496
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ $config->gitlab->bugLabel->description = "bug label from zentao";
$config->gitlab->bugLabel->color = "#D10069";
$config->gitlab->bugLabel->priority = "0";
$config->gitlab->zentaoApiWebhookUrl = "https://zentao/api/v1/webhook/callback";
$config->gitlab->zentaoApiWebhookUrl = "%s/api.php?m=gitlab&f=webhook&product=%s&gitlab=%s&project=%s";
$config->gitlab->zentaoApiWebhookToken = "<access token>";
+3 -3
View File
@@ -235,10 +235,10 @@ class gitlabModel extends model
* @access public
* @return void
*/
public function createWebhook($gitlabID, $projectID)
public function createWebhook($products, $gitlabID, $projectID)
{
// TODO(dingguodong) add more robust code here.
$response = $this->apiCreateHook($gitlabID, $projectID, $this->config->gitlab->zentaoApiWebhookUrl, $this->config->gitlab->zentaoApiWebhookToken);
$webhook = sprintf($this->config->gitlab->zentaoApiWebhookUrl, commonModel::getSysURL(), $gitlabID);
$response = $this->apiCreateHook($gitlabID, $projectID, $webhook, $this->config->gitlab->zentaoApiWebhookToken);
return $response;
}