Merge pull request #2137 from LucianoLaratelli/main

Don't append '.git' for sr.ht repositories
This commit is contained in:
Andras Bacsai
2024-05-06 12:29:13 +02:00
committed by GitHub

View File

@@ -98,7 +98,8 @@ class PublicGitRepository extends Component
(str($this->repository_url)->startsWith('https://') || (str($this->repository_url)->startsWith('https://') ||
str($this->repository_url)->startsWith('http://')) && str($this->repository_url)->startsWith('http://')) &&
!str($this->repository_url)->endsWith('.git') && !str($this->repository_url)->endsWith('.git') &&
!str($this->repository_url)->contains('github.com') (!str($this->repository_url)->contains('github.com') ||
!str($this->repository_url)->contains('git.sr.ht'))
) { ) {
$this->repository_url = $this->repository_url . '.git'; $this->repository_url = $this->repository_url . '.git';
} }