summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-02-01 14:28:04 +0000
committerSean McGivern <sean@gitlab.com>2017-02-03 09:46:03 +0000
commit7550f60ddeecebac3f84e8690ab3f42428600ff7 (patch)
treef2121574ae7e46a2cc970f92a1287ad1289c4e5b /app/helpers
parentfd46fb1cd9cc1fdf826d31261aa594baa38d4898 (diff)
downloadgitlab-ce-7550f60ddeecebac3f84e8690ab3f42428600ff7.tar.gz
Backport changes from EE squash
Backport changes from the EE-only squash implementation, which would otherwise conflict when merge CE into EE. <https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1024>
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/merge_requests_helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb
index 8c2c4e8833b..83ff898e68a 100644
--- a/app/helpers/merge_requests_helper.rb
+++ b/app/helpers/merge_requests_helper.rb
@@ -143,4 +143,16 @@ module MergeRequestsHelper
def different_base?(version1, version2)
version1 && version2 && version1.base_commit_sha != version2.base_commit_sha
end
+
+ def merge_params(merge_request)
+ {
+ merge_when_build_succeeds: true,
+ should_remove_source_branch: true,
+ sha: merge_request.diff_head_sha
+ }.merge(merge_params_ee(merge_request))
+ end
+
+ def merge_params_ee(merge_request)
+ {}
+ end
end