From 1c7034ff78ecdef59a7e0b14f85c782435e68b82 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 18 Jul 2024 12:30:45 +0200 Subject: [PATCH] fix: if git limit reached, ignore it and continue with a default selection --- app/Livewire/Project/New/PublicGitRepository.php | 7 +++++++ .../project/new/public-git-repository.blade.php | 13 +++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/Livewire/Project/New/PublicGitRepository.php b/app/Livewire/Project/New/PublicGitRepository.php index bf6324c64..5759e335e 100644 --- a/app/Livewire/Project/New/PublicGitRepository.php +++ b/app/Livewire/Project/New/PublicGitRepository.php @@ -155,6 +155,13 @@ public function loadBranch() $this->getBranch(); $this->selectedBranch = $this->git_branch; } catch (\Throwable $e) { + if ($this->rate_limit_remaining == 0) { + $this->selectedBranch = $this->git_branch; + $this->branchFound = true; + + return; + } + ray($this->branchFound, $this->git_branch, $this->rate_limit_remaining); if (! $this->branchFound && $this->git_branch == 'main') { try { $this->git_branch = 'master'; diff --git a/resources/views/livewire/project/new/public-git-repository.blade.php b/resources/views/livewire/project/new/public-git-repository.blade.php index 17ef0a188..01cd67575 100644 --- a/resources/views/livewire/project/new/public-git-repository.blade.php +++ b/resources/views/livewire/project/new/public-git-repository.blade.php @@ -11,14 +11,11 @@ Check repository - @if (!$branchFound) -
-
- For example application deployments, checkout Coolify - Examples. -
- @endif +
+ For example application deployments, checkout Coolify + Examples. +
@if ($branchFound) @if ($rate_limit_remaining && $rate_limit_reset)