Fix manual Git webhook generation

This commit is contained in:
Andras Bacsai
2023-11-14 14:14:21 +01:00
parent 0590ed7b2e
commit e4b2195932
2 changed files with 28 additions and 21 deletions

View File

@@ -511,6 +511,9 @@ function generateDeployWebhook($resource)
return $url;
}
function generateGitManualWebhook($resource, $type) {
if ($resource->source_id !== 0) {
return null;
}
if ($resource->getMorphClass() === 'App\Models\Application') {
$baseUrl = base_url();
$api = Url::fromString($baseUrl) . "/webhooks/source/$type/events/manual";