diff options
author | Nick Thomas <nick@gitlab.com> | 2018-11-07 20:04:35 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-11-07 20:04:35 +0300 |
commit | 06e8cf58558cccc5a8556e94c93aa4bf25dc083e (patch) | |
tree | ff70c85f5445127d7a3d2813da3b3ec7904bb3e5 /app | |
parent | 98762fe651ea0c4b14106166a742feaba332c128 (diff) | |
parent | e0054a9ab1dc7f99acff7b4614242a3dbf9328ee (diff) |
Merge branch 'revert-45b61a9e' into 'master'
Revert "Merge branch 'blackst0ne-update-push-new-merge-request-url' into 'master'"
See merge request gitlab-org/gitlab-ce!22875
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/concerns/creates_commit.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/merge_requests/creations_controller.rb | 2 | ||||
-rw-r--r-- | app/helpers/compare_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/merge_requests_helper.rb | 4 | ||||
-rw-r--r-- | app/services/merge_requests/get_urls_service.rb | 4 |
5 files changed, 6 insertions, 8 deletions
diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index f644702cbdb..b3777fd2b0f 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -86,10 +86,10 @@ module CreatesCommit def new_merge_request_path project_new_merge_request_path( @project_to_commit_into, - merge_request_source_branch: @branch_name, merge_request: { source_project_id: @project_to_commit_into.id, target_project_id: @project.id, + source_branch: @branch_name, target_branch: @start_branch } ) diff --git a/app/controllers/projects/merge_requests/creations_controller.rb b/app/controllers/projects/merge_requests/creations_controller.rb index bbf662a63c8..5639402a1e9 100644 --- a/app/controllers/projects/merge_requests/creations_controller.rb +++ b/app/controllers/projects/merge_requests/creations_controller.rb @@ -89,8 +89,6 @@ class Projects::MergeRequests::CreationsController < Projects::MergeRequests::Ap def build_merge_request params[:merge_request] ||= ActionController::Parameters.new(source_project: @project) - params[:merge_request][:source_branch] ||= params[:merge_request_source_branch].presence - @merge_request = ::MergeRequests::BuildService.new(project, current_user, merge_request_params.merge(diff_options: diff_options)).execute end diff --git a/app/helpers/compare_helper.rb b/app/helpers/compare_helper.rb index 57e397f6ca0..9ece8b0bc5b 100644 --- a/app/helpers/compare_helper.rb +++ b/app/helpers/compare_helper.rb @@ -13,8 +13,8 @@ module CompareHelper def create_mr_path(from = params[:from], to = params[:to], project = @project) project_new_merge_request_path( project, - merge_request_source_branch: to, merge_request: { + source_branch: to, target_branch: from } ) diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb index 8f549bfce73..23d7aa427bb 100644 --- a/app/helpers/merge_requests_helper.rb +++ b/app/helpers/merge_requests_helper.rb @@ -11,10 +11,10 @@ module MergeRequestsHelper def new_mr_from_push_event(event, target_project) { - merge_request_source_branch: event.branch_name, merge_request: { source_project_id: event.project.id, target_project_id: target_project.id, + source_branch: event.branch_name, target_branch: target_project.repository.root_ref } } @@ -51,10 +51,10 @@ module MergeRequestsHelper def mr_change_branches_path(merge_request) project_new_merge_request_path( @project, - merge_request_source_branch: merge_request.source_branch, merge_request: { source_project_id: merge_request.source_project_id, target_project_id: merge_request.target_project_id, + source_branch: merge_request.source_branch, target_branch: merge_request.target_branch }, change_branches: true diff --git a/app/services/merge_requests/get_urls_service.rb b/app/services/merge_requests/get_urls_service.rb index 35a22449e34..7c88c9abb41 100644 --- a/app/services/merge_requests/get_urls_service.rb +++ b/app/services/merge_requests/get_urls_service.rb @@ -50,8 +50,8 @@ module MergeRequests end def url_for_new_merge_request(branch_name) - url = Gitlab::Routing.url_helpers.project_new_merge_request_url(project, branch_name) - + merge_request_params = { source_branch: branch_name } + url = Gitlab::Routing.url_helpers.project_new_merge_request_url(project, merge_request: merge_request_params) { branch_name: branch_name, url: url, new_merge_request: true } end |