diff options
author | Luke Duncalfe <lduncalfe@gitlab.com> | 2019-03-07 21:11:28 +0000 |
---|---|---|
committer | Luke Duncalfe <lduncalfe@eml.cc> | 2019-03-08 11:07:48 +1300 |
commit | 33205b08c9a425c8338a8292fa0b389db355c7a6 (patch) | |
tree | 96e6d3d293812d59876780bc9e7b1f42a03a9070 | |
parent | 1de36fd2eef900a93606e1c0558f736ad88717cd (diff) | |
download | gitlab-ce-33205b08c9a425c8338a8292fa0b389db355c7a6.tar.gz |
Revert "Merge branch 'sh-show-pre-receive-error-merge' into 'master'"
This reverts merge request !25708
-rw-r--r-- | app/services/merge_requests/merge_service.rb | 3 | ||||
-rw-r--r-- | changelogs/unreleased/sh-show-pre-receive-error-merge.yml | 5 | ||||
-rw-r--r-- | spec/services/merge_requests/merge_service_spec.rb | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/app/services/merge_requests/merge_service.rb b/app/services/merge_requests/merge_service.rb index b29e0b1759e..8241e408ce5 100644 --- a/app/services/merge_requests/merge_service.rb +++ b/app/services/merge_requests/merge_service.rb @@ -76,7 +76,8 @@ module MergeRequests def try_merge repository.merge(current_user, source, merge_request, commit_message) rescue Gitlab::Git::PreReceiveError => e - raise_error("Something went wrong during merge pre-receive hook: #{e.message}") + handle_merge_error(log_message: e.message) + raise_error('Something went wrong during merge pre-receive hook') rescue => e handle_merge_error(log_message: e.message) raise_error('Something went wrong during merge') diff --git a/changelogs/unreleased/sh-show-pre-receive-error-merge.yml b/changelogs/unreleased/sh-show-pre-receive-error-merge.yml deleted file mode 100644 index 5e662b34773..00000000000 --- a/changelogs/unreleased/sh-show-pre-receive-error-merge.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Show pre-receive error message when merge fails -merge_request: 25708 -author: -type: fixed diff --git a/spec/services/merge_requests/merge_service_spec.rb b/spec/services/merge_requests/merge_service_spec.rb index 9d674263259..ede79b87bcc 100644 --- a/spec/services/merge_requests/merge_service_spec.rb +++ b/spec/services/merge_requests/merge_service_spec.rb @@ -244,7 +244,7 @@ describe MergeRequests::MergeService do service.execute(merge_request) - expect(merge_request.merge_error).to include("Something went wrong during merge pre-receive hook: #{error_message}") + expect(merge_request.merge_error).to include('Something went wrong during merge pre-receive hook') expect(Rails.logger).to have_received(:error).with(a_string_matching(error_message)) end |