Merge pull request #2137 from LucianoLaratelli/main

Don't append '.git' for sr.ht repositories
This commit is contained in:
Andras Bacsai authored and GitHub committed 2024-05-06 12:29:13 +02:00
commit 17f82c8972
1 file changed
+2 -1
@@ -98,7 +98,8 @@ class PublicGitRepository extends Component
(str($this->repository_url)->startsWith('https://') ||
str($this->repository_url)->startsWith('http://')) &&
!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';
}