Add target branch to cherry pick confirmation message

This commit is contained in:
George Andrinopoulos 2018-07-25 21:22:01 +03:00
parent 00baed8cb0
commit 70830c2300
3 changed files with 6 additions and 6 deletions

View file

@ -101,7 +101,7 @@ class Projects::CommitController < Projects::ApplicationController
@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)
end

View file

@ -230,7 +230,7 @@ describe Projects::CommitController do
id: master_pickable_commit.id)
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

View file

@ -21,7 +21,7 @@ describe 'Cherry-pick Commits' do
uncheck 'create_merge_request'
click_button 'Cherry-pick'
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
@ -32,7 +32,7 @@ describe 'Cherry-pick Commits' do
uncheck 'create_merge_request'
click_button 'Cherry-pick'
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
@ -59,7 +59,7 @@ describe 'Cherry-pick Commits' do
page.within('#modal-cherry-pick-commit') do
click_button 'Cherry-pick'
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")
end
end
@ -86,7 +86,7 @@ describe 'Cherry-pick Commits' do
click_button 'Cherry-pick'
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