diff --git a/pkg/commands/hosting_service/definitions.go b/pkg/commands/hosting_service/definitions.go index a192bbbe6..bd82d99a5 100644 --- a/pkg/commands/hosting_service/definitions.go +++ b/pkg/commands/hosting_service/definitions.go @@ -46,6 +46,7 @@ var azdoServiceDef = ServiceDefinition{ pullRequestURLIntoTargetBranch: "/pullrequestcreate?sourceRef={{.From}}&targetRef={{.To}}", commitURL: "/commit/{{.CommitHash}}", regexStrings: []string{ + `^.+@vs-ssh\.visualstudio\.com[:/](?:v3/)?(?P[^/]+)/(?P[^/]+)/(?P[^/]+?)(?:\.git)?$`, `^git@ssh.dev.azure.com.*/(?P.*)/(?P.*)/(?P.*?)(?:\.git)?$`, `^https://.*@dev.azure.com/(?P.*?)/(?P.*?)/_git/(?P.*?)(?:\.git)?$`, `^https://.*/(?P.*?)/(?P.*?)/_git/(?P.*?)(?:\.git)?$`, diff --git a/pkg/commands/hosting_service/hosting_service_test.go b/pkg/commands/hosting_service/hosting_service_test.go index f3504834b..bcf5e6fb4 100644 --- a/pkg/commands/hosting_service/hosting_service_test.go +++ b/pkg/commands/hosting_service/hosting_service_test.go @@ -231,12 +231,8 @@ func TestGetPullRequestURL(t *testing.T) { "vs-ssh.visualstudio.com": "azuredevops:dev.azure.com", }, test: func(url string, err error) { - /* EXPECTED: assert.NoError(t, err) assert.Equal(t, "https://dev.azure.com/myorg/myproject/_git/myrepo/pullrequestcreate?sourceRef=feature%2Fnew", url) - ACTUAL: */ - assert.Error(t, err) - assert.Equal(t, "", url) }, }, {