Commit 86e6dde1 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix specs

parent 9fcba59b
......@@ -2,7 +2,7 @@ module Ci
class CreatePipelineService < BaseService
attr_reader :pipeline
def execute(source, ignore_skip_ci: false, save_on_errors: true, trigger_request: nil, schedule: nil, mirror_update: false)
def execute(source, ignore_skip_ci: false, save_on_errors: true, trigger_request: nil, schedule: nil, mirror_update: false, &block)
@pipeline = Ci::Pipeline.new(
source: source,
project: project,
......@@ -51,6 +51,12 @@ module Ci
return error('No builds for this pipeline.')
end
_create_pipeline(&block)
end
private
def _create_pipeline
Ci::Pipeline.transaction do
update_merge_requests_head_pipeline if pipeline.save
......
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