Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Fix repository URL handling in PublicGitRepository.php and public-git-repository.blade.php

Andras Bacsai57d67bc4a8a6
diff --git a/app/Livewire/Project/New/PublicGitRepository.php b/app/Livewire/Project/New/PublicGitRepository.php
index afc345db2c..0578421b53 100644
--- a/app/Livewire/Project/New/PublicGitRepository.php
+++ b/app/Livewire/Project/New/PublicGitRepository.php
@@ -94,6 +94,13 @@ class PublicGitRepository extends Component
$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 @@ class PublicGitRepository extends Component
'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 da09c1dd61..d27e3f259d 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 @@
<div class="pb-4">Deploy any public Git repositories.</div>
<form class="flex flex-col gap-2" wire:submit='load_branch'>
<div class="flex flex-col gap-2">
- <div class="flex flex-col">
+ <div class="flex flex-col gap-2">
<div class="flex items-end gap-2">
<x-forms.input required id="repository_url" label="Repository URL (https://)" helper="{!! __('repository.url') !!}" />
<x-forms.button type="submit">