Commit 677ff266 authored by Patrick Bajao's avatar Patrick Bajao

Fix Ruby 2.7 deprecation warnings for Conflict::FileCollection

In Ruby 3.0, positional arguments and keyword arguments will be
separated. In Ruby 2.7, deprecation warnings related to keyword
arguments show up.

Pass the arguments as keyword arguments since `#resolve_conflicts`
expect keyword arguments.
parent 0583126b
...@@ -21,11 +21,13 @@ module Gitlab ...@@ -21,11 +21,13 @@ module Gitlab
def resolve(user, commit_message, files) def resolve(user, commit_message, files)
msg = commit_message || default_commit_message msg = commit_message || default_commit_message
resolution = Gitlab::Git::Conflict::Resolution.new(user, files, msg) resolution = Gitlab::Git::Conflict::Resolution.new(user, files, msg)
args = {
resolver.resolve_conflicts(
@source_repo,
resolution,
source_branch: merge_request.source_branch, source_branch: merge_request.source_branch,
target_branch: merge_request.target_branch target_branch: merge_request.target_branch
} )
resolver.resolve_conflicts(@source_repo, resolution, args)
ensure ensure
@merge_request.clear_memoized_shas @merge_request.clear_memoized_shas
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