diff options
Diffstat (limited to 'app/services/ci/pipeline_trigger_service.rb')
-rw-r--r-- | app/services/ci/pipeline_trigger_service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/ci/pipeline_trigger_service.rb b/app/services/ci/pipeline_trigger_service.rb index 62c4d6b4599..7746382b845 100644 --- a/app/services/ci/pipeline_trigger_service.rb +++ b/app/services/ci/pipeline_trigger_service.rb @@ -27,13 +27,13 @@ module Ci # this check is to not leak the presence of the project if user cannot read it return unless trigger.project == project - pipeline = Ci::CreatePipelineService + response = Ci::CreatePipelineService .new(project, trigger.owner, ref: params[:ref], variables_attributes: variables) .execute(:trigger, ignore_skip_ci: true) do |pipeline| pipeline.trigger_requests.build(trigger: trigger) end - pipeline_service_response(pipeline) + pipeline_service_response(response.payload) end def pipeline_service_response(pipeline) @@ -57,7 +57,7 @@ module Ci # this check is to not leak the presence of the project if user cannot read it return unless can?(job.user, :read_project, project) - pipeline = Ci::CreatePipelineService + response = Ci::CreatePipelineService .new(project, job.user, ref: params[:ref], variables_attributes: variables) .execute(:pipeline, ignore_skip_ci: true) do |pipeline| source = job.sourced_pipelines.build( @@ -69,7 +69,7 @@ module Ci pipeline.source_pipeline = source end - pipeline_service_response(pipeline) + pipeline_service_response(response.payload) end def job_from_token |