fix: Git ssh-scp syntax (#69)

* fix(deps): proper git ssh scheme

* feat(deps): git scp style

Adds support for the git ssh-scp style (`git@github.com:user/repo.git`),
which is an alternative form for ssh (note no ssh://).

* fix(deps): githubSlug also matching gitSSH

* test(deps): other hosts than github
This commit is contained in:
Tom 2020-01-29 16:58:25 +01:00 committed by GitHub
parent 7b8a7836a4
commit 8f14d63f95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 62 additions and 55 deletions

View file

@ -64,7 +64,7 @@ func TestParseDependency(t *testing.T) {
},
{
name: "SSH",
path: "git+ssh://git@github.com:jsonnet-bundler/jsonnet-bundler.git",
path: "git+ssh://git@github.com/jsonnet-bundler/jsonnet-bundler.git",
want: &deps.Dependency{
Source: deps.Source{
GitSource: &deps.Git{