From a89cb5cbdd832d4d9e80517973aceda6bc0a3856 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 6 Feb 2020 21:08:48 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/services/git/base_hooks_service.rb | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'app/services/git') diff --git a/app/services/git/base_hooks_service.rb b/app/services/git/base_hooks_service.rb index a49983a84fc..ea5b2f401b3 100644 --- a/app/services/git/base_hooks_service.rb +++ b/app/services/git/base_hooks_service.rb @@ -81,15 +81,17 @@ module Git end def pipeline_params - { - before: oldrev, - after: newrev, - ref: ref, - variables_attributes: generate_vars_from_push_options || [], - push_options: params[:push_options] || {}, - checkout_sha: Gitlab::DataBuilder::Push.checkout_sha( - project.repository, newrev, ref) - } + strong_memoize(:pipeline_params) do + { + before: oldrev, + after: newrev, + ref: ref, + variables_attributes: generate_vars_from_push_options || [], + push_options: params[:push_options] || {}, + checkout_sha: Gitlab::DataBuilder::Push.checkout_sha( + project.repository, newrev, ref) + } + end end def ci_variables_from_push_options @@ -156,12 +158,16 @@ module Git project_path: project.full_path, message: "Error creating pipeline", errors: exception.to_s, - pipeline_params: pipeline_params + pipeline_params: sanitized_pipeline_params } logger.warn(data) end + def sanitized_pipeline_params + pipeline_params.except(:push_options) + end + def logger if Gitlab::Runtime.sidekiq? Sidekiq.logger -- cgit v1.2.3