mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 16:14:22 +02:00
Fix manual Git webhook generation
This commit is contained in:
parent
0590ed7b2e
commit
e4b2195932
@ -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";
|
||||
|
@ -11,10 +11,11 @@
|
||||
</div>
|
||||
<div>
|
||||
<h3>Manual Git Webhooks</h3>
|
||||
@if ($githubManualWebhook && $gitlabManualWebhook)
|
||||
<form wire:submit.prevent='saveSecret' class="flex flex-col gap-2">
|
||||
<div class="flex items-end gap-2">
|
||||
<x-forms.input helper="Content Type in GitHub configuration could be json or form-urlencoded." readonly
|
||||
label="GitHub" id="githubManualWebhook"></x-forms.input>
|
||||
<x-forms.input helper="Content Type in GitHub configuration could be json or form-urlencoded."
|
||||
readonly label="GitHub" id="githubManualWebhook"></x-forms.input>
|
||||
<x-forms.input type="password"
|
||||
helper="Need to set a secret to be able to use this webhook. It should match with the secret in GitHub."
|
||||
label="GitHub Webhook Secret" id="resource.manual_webhook_secret_github"></x-forms.input>
|
||||
@ -33,5 +34,8 @@
|
||||
</div>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
</form>
|
||||
@else
|
||||
You are using an official Git App. You do not need manual webhooks.
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user