Commit 9630c51a authored by Patrick Bajao's avatar Patrick Bajao

Fix Ruby 2.7 deprecation warnings for RefreshService

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

Explicitly specify passing keyword arguments instead of a Hash
object by using double splat operator.

Since `Repository#create_file` expects kwargs, updated the spec
to pass options as keyword arguments.
parent 0583126b
......@@ -184,7 +184,7 @@ module MergeRequests
def abort_auto_merge_with_todo(merge_request, reason)
response = abort_auto_merge(merge_request, reason)
response = ServiceResponse.new(response)
response = ServiceResponse.new(**response)
return unless response.success?
todo_service.merge_request_became_unmergeable(merge_request)
......
......@@ -190,7 +190,7 @@ RSpec.describe MergeRequests::RefreshService do
end
before do
project.repository.create_file(owner, 'CODEOWNERS', file, { branch_name: 'test', message: 'codeowners' })
project.repository.create_file(owner, 'CODEOWNERS', file, branch_name: 'test', message: 'codeowners')
subject
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