Skip to content

Commit a44af06

Browse files
Kahitarstefanhaller
authored andcommitted
fix(hosting_service): support Azure DevOps vs-ssh.visualstudio.com SSH remotes
1 parent 8276d4a commit a44af06

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

pkg/commands/hosting_service/definitions.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ var azdoServiceDef = ServiceDefinition{
4646
pullRequestURLIntoTargetBranch: "/pullrequestcreate?sourceRef={{.From}}&targetRef={{.To}}",
4747
commitURL: "/commit/{{.CommitHash}}",
4848
regexStrings: []string{
49+
`^.+@vs-ssh\.visualstudio\.com[:/](?:v3/)?(?P<org>[^/]+)/(?P<project>[^/]+)/(?P<repo>[^/]+?)(?:\.git)?$`,
4950
`^[email protected].*/(?P<org>.*)/(?P<project>.*)/(?P<repo>.*?)(?:\.git)?$`,
5051
`^https://.*@dev.azure.com/(?P<org>.*?)/(?P<project>.*?)/_git/(?P<repo>.*?)(?:\.git)?$`,
5152
`^https://.*/(?P<org>.*?)/(?P<project>.*?)/_git/(?P<repo>.*?)(?:\.git)?$`,

pkg/commands/hosting_service/hosting_service_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,8 @@ func TestGetPullRequestURL(t *testing.T) {
231231
"vs-ssh.visualstudio.com": "azuredevops:dev.azure.com",
232232
},
233233
test: func(url string, err error) {
234-
/* EXPECTED:
235234
assert.NoError(t, err)
236235
assert.Equal(t, "https://dev.azure.com/myorg/myproject/_git/myrepo/pullrequestcreate?sourceRef=feature%2Fnew", url)
237-
ACTUAL: */
238-
assert.Error(t, err)
239-
assert.Equal(t, "", url)
240236
},
241237
},
242238
{

0 commit comments

Comments
 (0)