Commit 7cfaccd6 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix code style offenses in pipeline create services

parent 3420c0f7
...@@ -3,7 +3,7 @@ module Ci ...@@ -3,7 +3,7 @@ module Ci
attr_reader :pipeline attr_reader :pipeline
SEQUENCE = [Gitlab::Ci::Pipeline::Chain::Validate, SEQUENCE = [Gitlab::Ci::Pipeline::Chain::Validate,
Gitlab::Ci::Pipeline::Chain::Skip] Gitlab::Ci::Pipeline::Chain::Skip].freeze
def execute(source, ignore_skip_ci: false, save_on_errors: true, trigger_request: nil, schedule: nil) def execute(source, ignore_skip_ci: false, save_on_errors: true, trigger_request: nil, schedule: nil)
@pipeline = Ci::Pipeline.new( @pipeline = Ci::Pipeline.new(
...@@ -91,7 +91,6 @@ module Ci ...@@ -91,7 +91,6 @@ module Ci
.created_or_pending .created_or_pending
end end
def before_sha def before_sha
params[:checkout_sha] || params[:before] || Gitlab::Git::BLANK_SHA params[:checkout_sha] || params[:before] || Gitlab::Git::BLANK_SHA
end end
......
...@@ -10,7 +10,7 @@ module Gitlab ...@@ -10,7 +10,7 @@ module Gitlab
end end
def break? def break?
@pipeline.errors.any? || @pipeline.persisted? @pipeline.errors.any? || @pipeline.persisted?
end end
def allowed_to_trigger_pipeline? def allowed_to_trigger_pipeline?
......
...@@ -481,5 +481,4 @@ describe Ci::CreatePipelineService do ...@@ -481,5 +481,4 @@ describe Ci::CreatePipelineService do
end end
end end
end end
end 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