@@ -16,10 +16,13 @@ func TestParseOutGitDomain(t *testing.T) {
16
16
}{
17
17
{
"GitHub SSH" ,
"[email protected] :foo/bar" ,
"github.com" ,
nil },
18
18
{"GitHub HTTPS" , "https://github.com/foo/bar" , "github.com" , nil },
19
+ {
"GitHub HTTPS with username/password" ,
"https://foo:[email protected] /foo/bar" ,
"github.com" ,
nil },
19
20
{
"Gitlab SSH" ,
"[email protected] :foo/bar" ,
"gitlab.com" ,
nil },
20
21
{"Gitlab HTTPS" , "https://gitlab.com/foo/bar" , "gitlab.com" , nil },
22
+ {
"Gitlab HTTPS with username/password" ,
"https://gitlab-ci-token:[email protected] /foo/bar" ,
"gitlab.com" ,
nil },
21
23
{
"Bitbucket SSH" ,
"[email protected] :foo/bar" ,
"bitbucket.com" ,
nil },
22
24
{"Bitbucket HTTPS" , "https://bitbucket.com/foo/bar" , "bitbucket.com" , nil },
25
+ {
"Bitbucket HTTPS with username/password" ,
"https://user:[email protected] /foo/bar" ,
"bitbucket.com" ,
nil },
23
26
{"Invalid" , "foo/bar" , "" , fmt .Errorf ("Could not parse git repository domain for 'foo/bar'" )},
24
27
}
25
28
0 commit comments