From 48aff82709769b098321c738f3444b9bdaa694c6 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 21 Oct 2020 07:08:36 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-5-stable-ee --- spec/support/helpers/cycle_analytics_helpers.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'spec/support/helpers/cycle_analytics_helpers.rb') diff --git a/spec/support/helpers/cycle_analytics_helpers.rb b/spec/support/helpers/cycle_analytics_helpers.rb index f4343b8b783..6d3ac699a7c 100644 --- a/spec/support/helpers/cycle_analytics_helpers.rb +++ b/spec/support/helpers/cycle_analytics_helpers.rb @@ -126,17 +126,15 @@ module CycleAnalyticsHelpers end def mock_gitaly_multi_action_dates(repository, commit_time) - allow(repository.raw).to receive(:multi_action).and_wrap_original do |m, *args| + allow(repository.raw).to receive(:multi_action).and_wrap_original do |m, user, kargs| new_date = commit_time || Time.now - branch_update = m.call(*args) + branch_update = m.call(user, **kargs) if branch_update.newrev - _, opts = args - commit = rugged_repo(repository).rev_parse(branch_update.newrev) branch_update.newrev = commit.amend( - update_ref: "#{Gitlab::Git::BRANCH_REF_PREFIX}#{opts[:branch_name]}", + update_ref: "#{Gitlab::Git::BRANCH_REF_PREFIX}#{kargs[:branch_name]}", author: commit.author.merge(time: new_date), committer: commit.committer.merge(time: new_date) ) -- cgit v1.2.3