summaryrefslogtreecommitdiff
path: root/config/routes
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-10-29 21:19:42 +0000
committerDouwe Maan <douwe@gitlab.com>2018-10-29 21:19:42 +0000
commit45b61a9ece48550f51432c8cca7de7e1a298ca08 (patch)
treeb305158d82f83dc16203490ed03e7103d7e523d3 /config/routes
parente4e40b963226099ba76718b692c6c944336c7f5c (diff)
parent72ff187c36bc73bddb349269f08f8fb46eab2676 (diff)
downloadgitlab-ce-45b61a9ece48550f51432c8cca7de7e1a298ca08.tar.gz
Merge branch 'blackst0ne-update-push-new-merge-request-url' into 'master'
Make new merge request URL more friendly when pushing code Closes #53012 See merge request gitlab-org/gitlab-ce!22526
Diffstat (limited to 'config/routes')
-rw-r--r--config/routes/project.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 85872a4122a..73c46f72168 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -149,9 +149,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
scope path: 'merge_requests', controller: 'merge_requests/creations' do
post '', action: :create, as: nil
- scope path: 'new', as: :new_merge_request do
- get '', action: :new
-
+ scope path: 'new/(:merge_request_source_branch)', as: :new_merge_request do
scope constraints: { format: nil }, action: :new do
get :diffs, defaults: { tab: 'diffs' }
get :pipelines, defaults: { tab: 'pipelines' }
@@ -165,6 +163,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
get :diff_for_path
get :branch_from
get :branch_to
+ get '', action: :new
end
end