fix: if git limit reached, ignore it and continue with a default selection

This commit is contained in:
Andras Bacsai
2024-07-18 12:30:45 +02:00
parent 7e11698c55
commit 1c7034ff78
2 changed files with 12 additions and 8 deletions

View File

@@ -155,6 +155,13 @@ class PublicGitRepository extends Component
$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';