Add manual Git webhooks and migration files

This commit is contained in:
Andras Bacsai
2023-11-14 13:26:14 +01:00
parent 45fa88ca4d
commit 8db66952e8
9 changed files with 383 additions and 10 deletions

View File

@@ -510,6 +510,14 @@ function generateDeployWebhook($resource)
$url = $api . $endpoint . "?uuid=$uuid&force=false";
return $url;
}
function generateGitManualWebhook($resource, $type) {
if ($resource->getMorphClass() === 'App\Models\Application') {
$baseUrl = base_url();
$api = Url::fromString($baseUrl) . "/webhooks/source/$type/events/manual";
return $api;
}
return null;
}
function removeAnsiColors($text)
{
return preg_replace('/\e[[][A-Za-z0-9];?[0-9]*m?/', '', $text);