Commit 800b50a3 authored by Sean McGivern's avatar Sean McGivern

Merge branch '41441-add-target-branch-name-to-cherrypick-confirmation' into 'master'

Resolve "Cherry-picking: Confirmation message should include target branch name"

Closes #41441

See merge request gitlab-org/gitlab-ce!20846
parents 1c9d26b5 7453a029
...@@ -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 #{@branch_name}.",
success_path: -> { successful_change_path }, failure_path: failed_change_path) success_path: -> { successful_change_path }, failure_path: failed_change_path)
end end
......
---
title: Add target branch name to cherrypick confirmation message
merge_request: 20846
author: George Andrinopoulos
type: other
...@@ -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 cherry-pick-#{master_pickable_commit.short_id}. 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 feature.')
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