Skip to content

Commit 1c7034f

Browse files
committed
fix: if git limit reached, ignore it and continue with a default selection
1 parent 7e11698 commit 1c7034f

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

app/Livewire/Project/New/PublicGitRepository.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,13 @@ public function loadBranch()
155155
$this->getBranch();
156156
$this->selectedBranch = $this->git_branch;
157157
} catch (\Throwable $e) {
158+
if ($this->rate_limit_remaining == 0) {
159+
$this->selectedBranch = $this->git_branch;
160+
$this->branchFound = true;
161+
162+
return;
163+
}
164+
ray($this->branchFound, $this->git_branch, $this->rate_limit_remaining);
158165
if (! $this->branchFound && $this->git_branch == 'main') {
159166
try {
160167
$this->git_branch = 'master';

resources/views/livewire/project/new/public-git-repository.blade.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@
1111
Check repository
1212
</x-forms.button>
1313
</div>
14-
@if (!$branchFound)
15-
<div class="px-2 pt-4">
16-
<div>
17-
For example application deployments, checkout <a class="underline dark:text-white"
18-
href="https://github.com/coollabsio/coolify-examples/" target="_blank">Coolify
19-
Examples</a>.
20-
</div>
21-
@endif
14+
<div>
15+
For example application deployments, checkout <a class="underline dark:text-white"
16+
href="https://github.com/coollabsio/coolify-examples/" target="_blank">Coolify
17+
Examples</a>.
18+
</div>
2219
@if ($branchFound)
2320
@if ($rate_limit_remaining && $rate_limit_reset)
2421
<div class="flex gap-2 py-2">

0 commit comments

Comments
 (0)