From 57d67bc4a8a6aac3f3424d5aa9a24b37dcc41842 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 29 Apr 2024 13:43:45 +0200 Subject: [PATCH] Fix repository URL handling in PublicGitRepository.php and public-git-repository.blade.php --- app/Livewire/Project/New/PublicGitRepository.php | 10 +++++++--- .../project/new/public-git-repository.blade.php | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Livewire/Project/New/PublicGitRepository.php b/app/Livewire/Project/New/PublicGitRepository.php index afc345db2..0578421b5 100644 --- a/app/Livewire/Project/New/PublicGitRepository.php +++ b/app/Livewire/Project/New/PublicGitRepository.php @@ -94,6 +94,13 @@ public function load_branch() $repository = str($this->repository_url)->after(':')->before('.git'); $this->repository_url = 'https://' . str($github_instance) . '/' . $repository; } + if ( + (str($this->repository_url)->startsWith('https://') || + str($this->repository_url)->startsWith('http://')) && + !str($this->repository_url)->endsWith('.git') + ) { + $this->repository_url = $this->repository_url . '.git'; + } } catch (\Throwable $e) { return handleError($e, $this); } @@ -192,9 +199,6 @@ public function submit() 'build_pack' => $this->build_pack, ]; } - if ($this->build_pack === 'dockerfile' || $this->build_pack === 'dockerimage' || $this->application->dockerfile) { - $application_init['health_check_enabled'] = false; - } $application = Application::create($application_init); 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 da09c1dd6..d27e3f259 100644 --- a/resources/views/livewire/project/new/public-git-repository.blade.php +++ b/resources/views/livewire/project/new/public-git-repository.blade.php @@ -3,7 +3,7 @@
Deploy any public Git repositories.
-
+