diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-01-31 16:32:44 -0200 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-02-25 10:40:58 -0300 |
commit | 1ad699677fa4b24a9bc002c6dc20164b8832bca5 (patch) | |
tree | 8018d8af35b14d78b20144788a0b271226347a9b /lib/gitlab/git/repository.rb | |
parent | 992183534dd1af54bf891789aca5777ea91c0942 (diff) | |
download | gitlab-ce-1ad699677fa4b24a9bc002c6dc20164b8832bca5.tar.gz |
Support merge to ref for merge-commit and squash
Adds the ground work for writing into
the merge ref refs/merge-requests/:iid/merge the
merge result between source and target branches of
a MR, without further side-effects such as
mailing, MR updates and target branch changes.
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r-- | lib/gitlab/git/repository.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 593a3676519..aea132a3dd9 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -556,6 +556,12 @@ module Gitlab tags.find { |tag| tag.name == name } end + def merge_to_ref(user, source_sha, branch, target_ref, message) + wrapped_gitaly_errors do + gitaly_operation_client.user_merge_to_ref(user, source_sha, branch, target_ref, message) + end + end + def merge(user, source_sha, target_branch, message, &block) wrapped_gitaly_errors do gitaly_operation_client.user_merge_branch(user, source_sha, target_branch, message, &block) |