diff options
author | George Andrinopoulos <geoandri@gmail.com> | 2018-07-25 21:22:01 +0300 |
---|---|---|
committer | George Andrinopoulos <geoandri@gmail.com> | 2018-08-19 23:11:49 +0300 |
commit | 70830c23002c198d96cae1bf9cdf153b025f9c09 (patch) | |
tree | 4499094d1178aba839cf3db6668b1e457213025f | |
parent | 00baed8cb0725f7e05e6dab4e498acf2b425a5b2 (diff) | |
download | gitlab-ce-70830c23002c198d96cae1bf9cdf153b025f9c09.tar.gz |
Add target branch to cherry pick confirmation message
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 2 | ||||
-rw-r--r-- | spec/controllers/projects/commit_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/commit/cherry_pick_spec.rb | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 44b176d304e..641e1d362b5 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -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 diff --git a/spec/controllers/projects/commit_controller_spec.rb b/spec/controllers/projects/commit_controller_spec.rb index 916a4be2567..9e149bc4c3c 100644 --- a/spec/controllers/projects/commit_controller_spec.rb +++ b/spec/controllers/projects/commit_controller_spec.rb @@ -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 diff --git a/spec/features/projects/commit/cherry_pick_spec.rb b/spec/features/projects/commit/cherry_pick_spec.rb index bc3c00dafe2..d53d6d32c3c 100644 --- a/spec/features/projects/commit/cherry_pick_spec.rb +++ b/spec/features/projects/commit/cherry_pick_spec.rb @@ -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 |