fix: webhook endpoint in cloud and no system wide gh app
This commit is contained in:
parent
b4a3236284
commit
d28cf0b76d
@ -37,9 +37,13 @@ class Change extends Component
|
|||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
$this->webhook_endpoint = $this->ipv4;
|
if (is_cloud()) {
|
||||||
|
$this->webhook_endpoint = config('app.url');
|
||||||
|
} else {
|
||||||
|
$this->webhook_endpoint = $this->ipv4;
|
||||||
|
$this->is_system_wide = $this->github_app->is_system_wide;
|
||||||
|
}
|
||||||
$this->parameters = get_route_parameters();
|
$this->parameters = get_route_parameters();
|
||||||
$this->is_system_wide = $this->github_app->is_system_wide;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function submit()
|
public function submit()
|
||||||
|
@ -77,20 +77,22 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pt-1 pb-2 ">You need to register a GitHub App before using this source.</div>
|
<div class="pt-1 pb-2 ">You need to register a GitHub App before using this source.</div>
|
||||||
<div class="pt-2 pb-10">
|
<div class="pt-2 pb-10">
|
||||||
<div class="flex items-end gap-2">
|
@if (!is_cloud())
|
||||||
<x-forms.select wire:model='webhook_endpoint' label="Webhook Endpoint"
|
<div class="flex items-end gap-2">
|
||||||
helper="All Git webhooks will be sent to this endpoint. <br><br>If you would like to use domain instead of IP address, set your Coolify instance's FQDN in the Settings menu.">
|
<x-forms.select wire:model='webhook_endpoint' label="Webhook Endpoint"
|
||||||
@if ($ipv4)
|
helper="All Git webhooks will be sent to this endpoint. <br><br>If you would like to use domain instead of IP address, set your Coolify instance's FQDN in the Settings menu.">
|
||||||
<option value="{{ $ipv4 }}">Use {{ $ipv4 }}</option>
|
@if ($ipv4)
|
||||||
@endif
|
<option value="{{ $ipv4 }}">Use {{ $ipv4 }}</option>
|
||||||
@if ($ipv6)
|
@endif
|
||||||
<option value="{{ $ipv6 }}">Use {{ $ipv6 }}</option>
|
@if ($ipv6)
|
||||||
@endif
|
<option value="{{ $ipv6 }}">Use {{ $ipv6 }}</option>
|
||||||
@if ($fqdn)
|
@endif
|
||||||
<option value="{{ $fqdn }}">Use {{ $fqdn }}</option>
|
@if ($fqdn)
|
||||||
@endif
|
<option value="{{ $fqdn }}">Use {{ $fqdn }}</option>
|
||||||
</x-forms.select>
|
@endif
|
||||||
</div>
|
</x-forms.select>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
<div class="flex flex-col gap-2 pt-4">
|
<div class="flex flex-col gap-2 pt-4">
|
||||||
<x-forms.checkbox disabled instantSave id="default_permissions" label="Default Permissions"
|
<x-forms.checkbox disabled instantSave id="default_permissions" label="Default Permissions"
|
||||||
helper="Contents: read<br>Metadata: read<br>Email: read" />
|
helper="Contents: read<br>Metadata: read<br>Email: read" />
|
||||||
@ -118,9 +120,11 @@
|
|||||||
<x-forms.input type="number" id="github_app.custom_port" label="Port" required />
|
<x-forms.input type="number" id="github_app.custom_port" label="Port" required />
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<x-forms.checkbox
|
@if (!is_cloud())
|
||||||
helper="If checked, this GitHub App will be available for everyone in this Coolify instance."
|
<x-forms.checkbox
|
||||||
label="System Wide?" disabled id="is_system_wide" />
|
helper="If checked, this GitHub App will be available for everyone in this Coolify instance."
|
||||||
|
label="System Wide?" disabled id="is_system_wide" />
|
||||||
|
@endif
|
||||||
<script>
|
<script>
|
||||||
function createGithubApp(webhook_endpoint, preview_deployment_permissions) {
|
function createGithubApp(webhook_endpoint, preview_deployment_permissions) {
|
||||||
const {
|
const {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user