mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-04 23:37:41 +02:00
Allow on prem Azure DevOps Server pull request
This commit is contained in:
parent
f884cc2af9
commit
aad3dc42a7
@ -48,6 +48,7 @@ var azdoServiceDef = ServiceDefinition{
|
|||||||
regexStrings: []string{
|
regexStrings: []string{
|
||||||
`^git@ssh.dev.azure.com.*/(?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://.*@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}}",
|
repoURLTemplate: "https://{{.webDomain}}/{{.org}}/{{.project}}/_git/{{.repo}}",
|
||||||
}
|
}
|
||||||
|
@ -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)
|
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)",
|
testName: "Opens a link to new pull request on Bitbucket Server (SSH)",
|
||||||
from: "feature/new",
|
from: "feature/new",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user