mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-09 13:47:11 +02:00
Update gitlab merge request URL to match new routing
This commit is contained in:
parent
ec5075104a
commit
2d4ca2b54f
@ -33,8 +33,8 @@ var bitbucketServiceDef = ServiceDefinition{
|
|||||||
|
|
||||||
var gitLabServiceDef = ServiceDefinition{
|
var gitLabServiceDef = ServiceDefinition{
|
||||||
provider: "gitlab",
|
provider: "gitlab",
|
||||||
pullRequestURLIntoDefaultBranch: "/merge_requests/new?merge_request[source_branch]={{.From}}",
|
pullRequestURLIntoDefaultBranch: "/-/merge_requests/new?merge_request[source_branch]={{.From}}",
|
||||||
pullRequestURLIntoTargetBranch: "/merge_requests/new?merge_request[source_branch]={{.From}}&merge_request[target_branch]={{.To}}",
|
pullRequestURLIntoTargetBranch: "/-/merge_requests/new?merge_request[source_branch]={{.From}}&merge_request[target_branch]={{.To}}",
|
||||||
commitURL: "/commit/{{.CommitSha}}",
|
commitURL: "/commit/{{.CommitSha}}",
|
||||||
regexStrings: defaultUrlRegexStrings,
|
regexStrings: defaultUrlRegexStrings,
|
||||||
repoURLTemplate: defaultRepoURLTemplate,
|
repoURLTemplate: defaultRepoURLTemplate,
|
||||||
|
@ -112,7 +112,7 @@ func TestGetPullRequestURL(t *testing.T) {
|
|||||||
remoteUrl: "git@gitlab.com:peter/calculator.git",
|
remoteUrl: "git@gitlab.com:peter/calculator.git",
|
||||||
test: func(url string, err error) {
|
test: func(url string, err error) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, "https://gitlab.com/peter/calculator/merge_requests/new?merge_request[source_branch]=feature%2Fui", url)
|
assert.Equal(t, "https://gitlab.com/peter/calculator/-/merge_requests/new?merge_request[source_branch]=feature%2Fui", url)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -121,7 +121,7 @@ func TestGetPullRequestURL(t *testing.T) {
|
|||||||
remoteUrl: "git@gitlab.com:peter/public/calculator.git",
|
remoteUrl: "git@gitlab.com:peter/public/calculator.git",
|
||||||
test: func(url string, err error) {
|
test: func(url string, err error) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, "https://gitlab.com/peter/public/calculator/merge_requests/new?merge_request[source_branch]=feature%2Fui", url)
|
assert.Equal(t, "https://gitlab.com/peter/public/calculator/-/merge_requests/new?merge_request[source_branch]=feature%2Fui", url)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -130,7 +130,7 @@ func TestGetPullRequestURL(t *testing.T) {
|
|||||||
remoteUrl: "https://gitlab.com/peter/public/calculator.git",
|
remoteUrl: "https://gitlab.com/peter/public/calculator.git",
|
||||||
test: func(url string, err error) {
|
test: func(url string, err error) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, "https://gitlab.com/peter/public/calculator/merge_requests/new?merge_request[source_branch]=feature%2Fui", url)
|
assert.Equal(t, "https://gitlab.com/peter/public/calculator/-/merge_requests/new?merge_request[source_branch]=feature%2Fui", url)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -140,7 +140,7 @@ func TestGetPullRequestURL(t *testing.T) {
|
|||||||
remoteUrl: "git@gitlab.com:peter/calculator.git",
|
remoteUrl: "git@gitlab.com:peter/calculator.git",
|
||||||
test: func(url string, err error) {
|
test: func(url string, err error) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, "https://gitlab.com/peter/calculator/merge_requests/new?merge_request[source_branch]=feature%2Fcommit-ui&merge_request[target_branch]=epic%2Fui", url)
|
assert.Equal(t, "https://gitlab.com/peter/calculator/-/merge_requests/new?merge_request[source_branch]=feature%2Fcommit-ui&merge_request[target_branch]=epic%2Fui", url)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -150,7 +150,7 @@ func TestGetPullRequestURL(t *testing.T) {
|
|||||||
remoteUrl: "git@gitlab.com:peter/public/calculator.git",
|
remoteUrl: "git@gitlab.com:peter/public/calculator.git",
|
||||||
test: func(url string, err error) {
|
test: func(url string, err error) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, "https://gitlab.com/peter/public/calculator/merge_requests/new?merge_request[source_branch]=feature%2Fcommit-ui&merge_request[target_branch]=epic%2Fui", url)
|
assert.Equal(t, "https://gitlab.com/peter/public/calculator/-/merge_requests/new?merge_request[source_branch]=feature%2Fcommit-ui&merge_request[target_branch]=epic%2Fui", url)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -160,7 +160,7 @@ func TestGetPullRequestURL(t *testing.T) {
|
|||||||
remoteUrl: "https://gitlab.com/peter/public/calculator.git",
|
remoteUrl: "https://gitlab.com/peter/public/calculator.git",
|
||||||
test: func(url string, err error) {
|
test: func(url string, err error) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, "https://gitlab.com/peter/public/calculator/merge_requests/new?merge_request[source_branch]=feature%2Fcommit-ui&merge_request[target_branch]=epic%2Fui", url)
|
assert.Equal(t, "https://gitlab.com/peter/public/calculator/-/merge_requests/new?merge_request[source_branch]=feature%2Fcommit-ui&merge_request[target_branch]=epic%2Fui", url)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -373,7 +373,7 @@ func TestGetPullRequestURL(t *testing.T) {
|
|||||||
remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
|
remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
|
||||||
test: func(url string, err error) {
|
test: func(url string, err error) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, "https://gitlab.com/me/public/repo-with-issues/merge_requests/new?merge_request[source_branch]=feature%2FsomeIssue%23123&merge_request[target_branch]=master", url)
|
assert.Equal(t, "https://gitlab.com/me/public/repo-with-issues/-/merge_requests/new?merge_request[source_branch]=feature%2FsomeIssue%23123&merge_request[target_branch]=master", url)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -383,7 +383,7 @@ func TestGetPullRequestURL(t *testing.T) {
|
|||||||
remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
|
remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
|
||||||
test: func(url string, err error) {
|
test: func(url string, err error) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, "https://gitlab.com/me/public/repo-with-issues/merge_requests/new?merge_request[source_branch]=yolo&merge_request[target_branch]=archive%2Fnever-ending-feature%23666", url)
|
assert.Equal(t, "https://gitlab.com/me/public/repo-with-issues/-/merge_requests/new?merge_request[source_branch]=yolo&merge_request[target_branch]=archive%2Fnever-ending-feature%23666", url)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user