From 6da907f1c813563ba7583deaf7d2886450880fd7 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 26 May 2026 15:35:09 +0200 Subject: [PATCH] chore: inspect commit message guidance --- app/Livewire/Source/Github/Change.php | 12 +- .../livewire/source/github/change.blade.php | 455 ++++++++++-------- routes/web.php | 3 +- tests/Feature/GithubSourceChangeTest.php | 27 ++ 4 files changed, 289 insertions(+), 208 deletions(-) diff --git a/app/Livewire/Source/Github/Change.php b/app/Livewire/Source/Github/Change.php index cc9ceea8a..ed8daa861 100644 --- a/app/Livewire/Source/Github/Change.php +++ b/app/Livewire/Source/Github/Change.php @@ -76,6 +76,8 @@ class Change extends Component public string $manifestState = ''; + public string $activeTab = 'general'; + protected function rules(): array { return [ @@ -263,10 +265,18 @@ class Change extends Component } } $this->parameters = get_route_parameters(); + $routeName = request()->route()?->getName(); + if ($routeName === 'source.github.permissions') { + $this->activeTab = 'permissions'; + } elseif ($routeName === 'source.github.resources') { + $this->activeTab = 'resources'; + } else { + $this->activeTab = 'general'; + } if (isCloud() && ! isDev()) { $this->webhook_endpoint = config('app.url'); } else { - $this->webhook_endpoint = $this->fqdn ?? $this->ipv4 ?? ''; + $this->webhook_endpoint = $this->fqdn ?? $this->ipv4 ?? $this->ipv6 ?? config('app.url') ?? ''; $this->is_system_wide = $this->github_app->is_system_wide; } } catch (\Throwable $e) { diff --git a/resources/views/livewire/source/github/change.blade.php b/resources/views/livewire/source/github/change.blade.php index 623897de5..190938221 100644 --- a/resources/views/livewire/source/github/change.blade.php +++ b/resources/views/livewire/source/github/change.blade.php @@ -5,7 +5,8 @@

GitHub App

@if (data_get($github_app, 'installation_id')) - Save + Save @endif @can('delete', $github_app) @if ($applications->count() > 0) @@ -39,170 +40,187 @@ Install Repositories on GitHub @else -
-
-
- - - Sync Name - - @can('update', $github_app) - - - Rename - - - - - - Update Repositories + + +
+ + + - - @if (!isCloud()) -
- +
+ + +
- @if ($isSystemWide) - - System-wide GitHub Apps are shared across all teams on this Coolify instance. This means any team can use this GitHub App to deploy applications from your repositories. For better security and isolation, it's recommended to create team-specific GitHub Apps instead. - +
+ + @endif - @if (data_get($github_app, 'installation_id')) -
-
-
-
-

Resources

-
-
Here you can find all resources that are using this source.
-
- @if ($applications->isEmpty()) -
- No resources are currently using this GitHub App. -
- @else -
-
-
-
-
- - - - - - - - - - - @foreach ($applications->sortBy('name',SORT_NATURAL) as $resource) - - - - - - - @endforeach - -
- Project - - EnvironmentName - Type -
- {{ data_get($resource->project(), 'name') }} - - {{ data_get($resource, 'environment.name') }} - {{ $resource->name }} - - - {{ str($resource->type())->headline() }}
-
-
-
-
-
- @endif -
-
- @endif @else

GitHub App

@@ -216,31 +234,32 @@ @endcan
-
+
+
@can('create', $github_app) -

Manual Installation

-
- If you want to fill the form manually, you can continue below. Only for advanced users. - - Continue - -
-

Automated Installation

-
- - - - You must complete this step before you can use this source! -
- @endcan -
-
- @can('create', $github_app) - @if (!isCloud() || isDev()) -
- +
+
+ + + + + Recommended + +
+
+

Automated Installation

+

+ Register a GitHub App via GitHub's manifest flow. Permissions and webhooks are pre-configured. +

+
+
+ @if (!isCloud() || isDev()) + @if ($fqdn) @@ -255,44 +274,68 @@ @endif - - Register Now - -
- @else -
-

Register a GitHub App

- - Register Now - -
-
You need to register a GitHub App before using this source.
- @endif + @else +
You need to register a GitHub App before using this source.
+ @endif -
- - - {{-- --}} +
+ + +
- @else - - You don't have permission to create new GitHub Apps. Please contact your team administrator. - - @endcan +
+ + Register Now + +
+
+ + +
+
+
+ + + + + Advanced + +
+
+

Manual Installation

+

+ Fill the GitHub App form manually. For self-hosted GitHub Enterprise or custom permission setups. +

+
+
+ + Continue + +
+
+
+ @else +
+ + You don't have permission to create new GitHub Apps. Please contact your team administrator. +
+ @endcan
+