diff --git a/app/Http/Livewire/Project/New/PublicGitRepository.php b/app/Http/Livewire/Project/New/PublicGitRepository.php index 6229a7fc6..eb36cb1f1 100644 --- a/app/Http/Livewire/Project/New/PublicGitRepository.php +++ b/app/Http/Livewire/Project/New/PublicGitRepository.php @@ -39,7 +39,7 @@ class PublicGitRepository extends Component 'publish_directory' => 'publish directory', ]; private object $repository_url_parsed; - private GithubApp|GitlabApp $git_source; + private GithubApp|GitlabApp|null $git_source = null; private string $git_host; private string $git_repository; @@ -67,18 +67,17 @@ public function instantSave() public function load_branch() { - $this->branch_found = false; + try { + $this->branch_found = false; $this->validate([ 'repository_url' => 'required|url' ]); $this->get_git_source(); - try { - $this->get_branch(); - $this->selected_branch = $this->git_branch; + $this->get_branch(); + $this->selected_branch = $this->git_branch; } catch (\Exception $e) { return general_error_handler(err: $e, that: $this); } - if (!$this->branch_found && $this->git_branch == 'main') { try { $this->git_branch = 'master'; @@ -103,6 +102,9 @@ private function get_git_source() } elseif ($this->git_host == 'bitbucket.org') { // Not supported yet } + if (is_null($this->git_source)) { + throw new \Exception('Git source not found. What?!'); + } } private function get_branch() diff --git a/versions.json b/versions.json index 8f7d88515..12255ff0d 100644 --- a/versions.json +++ b/versions.json @@ -1,10 +1,10 @@ { - "coolify": { - "main": { - "version": "3.12.36" - }, - "v4": { - "version": "4.0.0-beta.22" + "coolify": { + "main": { + "version": "3.12.36" + }, + "v4": { + "version": "4.0.0-beta.22" + } } - } }