1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-13 11:50:28 +02:00

Allow on prem Azure DevOps Server pull request

This commit is contained in:
Wayne Bowie 2024-10-01 17:07:39 -05:00 committed by Jesse Duffield
parent f884cc2af9
commit aad3dc42a7
2 changed files with 14 additions and 0 deletions

View File

@ -48,6 +48,7 @@ var azdoServiceDef = ServiceDefinition{
regexStrings: []string{
`^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)?$`,
},
repoURLTemplate: "https://{{.webDomain}}/{{.org}}/{{.project}}/_git/{{.repo}}",
}

View File

@ -210,6 +210,19 @@ func TestGetPullRequestURL(t *testing.T) {
assert.Equal(t, "https://dev.azure.com/myorg/myproject/_git/myrepo/pullrequestcreate?sourceRef=feature%2Fnew&targetRef=dev", url)
},
},
{
testName: "Opens a link to new pull request on Azure DevOps Server (HTTP)",
from: "feature/new",
remoteUrl: "https://mycompany.azuredevops.com/collection/myproject/_git/myrepo",
configServiceDomains: map[string]string{
// valid configuration for a azure devops server URL
"mycompany.azuredevops.com": "azuredevops:mycompany.azuredevops.com",
},
test: func(url string, err error) {
assert.NoError(t, err)
assert.Equal(t, "https://mycompany.azuredevops.com/collection/myproject/_git/myrepo/pullrequestcreate?sourceRef=feature%2Fnew", url)
},
},
{
testName: "Opens a link to new pull request on Bitbucket Server (SSH)",
from: "feature/new",