1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-24 19:39:16 +02:00

fix(hosting_service): support Azure DevOps vs-ssh.visualstudio.com SSH remotes

This commit is contained in:
🚀 Niklas Arens
2025-08-13 19:59:50 +02:00
committed by Stefan Haller
parent 8276d4a50a
commit a44af0685c
2 changed files with 1 additions and 4 deletions

View File

@@ -46,6 +46,7 @@ var azdoServiceDef = ServiceDefinition{
pullRequestURLIntoTargetBranch: "/pullrequestcreate?sourceRef={{.From}}&targetRef={{.To}}",
commitURL: "/commit/{{.CommitHash}}",
regexStrings: []string{
`^.+@vs-ssh\.visualstudio\.com[:/](?:v3/)?(?P<org>[^/]+)/(?P<project>[^/]+)/(?P<repo>[^/]+?)(?:\.git)?$`,
`^git@ssh.dev.azure.com.*/(?P<org>.*)/(?P<project>.*)/(?P<repo>.*?)(?:\.git)?$`,
`^https://.*@dev.azure.com/(?P<org>.*?)/(?P<project>.*?)/_git/(?P<repo>.*?)(?:\.git)?$`,
`^https://.*/(?P<org>.*?)/(?P<project>.*?)/_git/(?P<repo>.*?)(?:\.git)?$`,

View File

@@ -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)
},
},
{