Merge pull request #17121 from daeho-ro/livecheck-ssh-git

download_strategy: add ssh://git scheme for git download strategy
This commit is contained in:
Mike McQuaid 2024-04-21 20:03:34 +01:00 committed by GitHub
commit eead9dd625
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -1468,7 +1468,8 @@ class DownloadStrategyDetector
GitHubGitDownloadStrategy
when %r{^https?://.+\.git$},
%r{^git://},
%r{^https?://git\.sr\.ht/[^/]+/[^/]+$}
%r{^https?://git\.sr\.ht/[^/]+/[^/]+$},
%r{^ssh://git}
GitDownloadStrategy
when %r{^https?://www\.apache\.org/dyn/closer\.cgi},
%r{^https?://www\.apache\.org/dyn/closer\.lua}

View File

@ -15,6 +15,12 @@ RSpec.describe DownloadStrategyDetector do
it { is_expected.to eq(GitDownloadStrategy) }
end
context "when given SSH Git URL" do
let(:url) { "ssh://git@example.com/foo.git" }
it { is_expected.to eq(GitDownloadStrategy) }
end
context "when given a GitHub Git URL" do
let(:url) { "https://github.com/homebrew/brew.git" }