Don't reset target branch when choosing to "Change branches" in MR
This commit is contained in:
parent
e3233016be
commit
7a65cb3abf
3 changed files with 4 additions and 4 deletions
|
@ -49,8 +49,9 @@ module MergeRequestsHelper
|
|||
source_project_id: @merge_request.source_project_id,
|
||||
target_project_id: @merge_request.target_project_id,
|
||||
source_branch: @merge_request.source_branch,
|
||||
target_branch: nil
|
||||
}
|
||||
target_branch: @merge_request.target_branch,
|
||||
},
|
||||
change_branches: true
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- page_title "New Merge Request"
|
||||
= render "header_title"
|
||||
|
||||
- if @merge_request.can_be_created
|
||||
- if @merge_request.can_be_created && !params[:change_branches]
|
||||
= render 'new_submit'
|
||||
- else
|
||||
= render 'new_compare'
|
||||
|
|
|
@ -112,7 +112,6 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
step 'I fill out an invalid "Merge Request On Forked Project" merge request' do
|
||||
select "Select branch", from: "merge_request_target_branch"
|
||||
expect(find(:select, "merge_request_source_project_id", {}).value).to eq @forked_project.id.to_s
|
||||
expect(find(:select, "merge_request_target_project_id", {}).value).to eq @project.id.to_s
|
||||
expect(find(:select, "merge_request_source_branch", {}).value).to eq ""
|
||||
|
|
Loading…
Reference in a new issue