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
commit 17f82c8972
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,7 +98,8 @@ public function load_branch()
(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';
}