Commit 70830c23 authored by George Andrinopoulos's avatar George Andrinopoulos

Add target branch to cherry pick confirmation message

parent 00baed8c
...@@ -101,7 +101,7 @@ class Projects::CommitController < Projects::ApplicationController ...@@ -101,7 +101,7 @@ class Projects::CommitController < Projects::ApplicationController
@branch_name = create_new_branch? ? @commit.cherry_pick_branch_name : @start_branch @branch_name = create_new_branch? ? @commit.cherry_pick_branch_name : @start_branch
create_commit(Commits::CherryPickService, success_notice: "The #{@commit.change_type_title(current_user)} has been successfully cherry-picked.", create_commit(Commits::CherryPickService, success_notice: "The #{@commit.change_type_title(current_user)} has been successfully cherry-picked into #{@start_branch}.",
success_path: -> { successful_change_path }, failure_path: failed_change_path) success_path: -> { successful_change_path }, failure_path: failed_change_path)
end end
......
...@@ -230,7 +230,7 @@ describe Projects::CommitController do ...@@ -230,7 +230,7 @@ describe Projects::CommitController do
id: master_pickable_commit.id) id: master_pickable_commit.id)
expect(response).to redirect_to project_commits_path(project, 'master') expect(response).to redirect_to project_commits_path(project, 'master')
expect(flash[:notice]).to eq('The commit has been successfully cherry-picked.') expect(flash[:notice]).to eq('The commit has been successfully cherry-picked into master.')
end end
end end
......
...@@ -21,7 +21,7 @@ describe 'Cherry-pick Commits' do ...@@ -21,7 +21,7 @@ describe 'Cherry-pick Commits' do
uncheck 'create_merge_request' uncheck 'create_merge_request'
click_button 'Cherry-pick' click_button 'Cherry-pick'
end end
expect(page).to have_content('The commit has been successfully cherry-picked.') expect(page).to have_content('The commit has been successfully cherry-picked into master.')
end end
end end
...@@ -32,7 +32,7 @@ describe 'Cherry-pick Commits' do ...@@ -32,7 +32,7 @@ describe 'Cherry-pick Commits' do
uncheck 'create_merge_request' uncheck 'create_merge_request'
click_button 'Cherry-pick' click_button 'Cherry-pick'
end end
expect(page).to have_content('The commit has been successfully cherry-picked.') expect(page).to have_content('The commit has been successfully cherry-picked into master.')
end end
end end
...@@ -59,7 +59,7 @@ describe 'Cherry-pick Commits' do ...@@ -59,7 +59,7 @@ describe 'Cherry-pick Commits' do
page.within('#modal-cherry-pick-commit') do page.within('#modal-cherry-pick-commit') do
click_button 'Cherry-pick' click_button 'Cherry-pick'
end end
expect(page).to have_content('The commit has been successfully cherry-picked. You can now submit a merge request to get this change into the original branch.') expect(page).to have_content('The commit has been successfully cherry-picked into master. You can now submit a merge request to get this change into the original branch.')
expect(page).to have_content("From cherry-pick-#{master_pickable_commit.short_id} into master") expect(page).to have_content("From cherry-pick-#{master_pickable_commit.short_id} into master")
end end
end end
...@@ -86,7 +86,7 @@ describe 'Cherry-pick Commits' do ...@@ -86,7 +86,7 @@ describe 'Cherry-pick Commits' do
click_button 'Cherry-pick' click_button 'Cherry-pick'
end end
expect(page).to have_content('The commit has been successfully cherry-picked.') expect(page).to have_content('The commit has been successfully cherry-picked into master.')
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment