diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-09-26 09:38:16 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-09-26 09:38:16 +0200 |
commit | 7cfaccd6edba11e43963bbd4dcb5c2bb3c71d9f4 (patch) | |
tree | 45692d7c7f5f6f13050474732b649a6c362e569a | |
parent | 3420c0f7dc7e9f11ec94a1b35b93ce7adba75bd1 (diff) | |
download | gitlab-ce-7cfaccd6edba11e43963bbd4dcb5c2bb3c71d9f4.tar.gz |
Fix code style offenses in pipeline create services
-rw-r--r-- | app/services/ci/create_pipeline_service.rb | 3 | ||||
-rw-r--r-- | lib/gitlab/ci/pipeline/chain/validate.rb | 2 | ||||
-rw-r--r-- | spec/services/ci/create_pipeline_service_spec.rb | 1 |
3 files changed, 2 insertions, 4 deletions
diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb index f96c4741ba4..c5a5d9fc527 100644 --- a/app/services/ci/create_pipeline_service.rb +++ b/app/services/ci/create_pipeline_service.rb @@ -3,7 +3,7 @@ module Ci attr_reader :pipeline 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) @pipeline = Ci::Pipeline.new( @@ -91,7 +91,6 @@ module Ci .created_or_pending end - def before_sha params[:checkout_sha] || params[:before] || Gitlab::Git::BLANK_SHA end diff --git a/lib/gitlab/ci/pipeline/chain/validate.rb b/lib/gitlab/ci/pipeline/chain/validate.rb index 4c4c8b27be6..ec06b0f76c5 100644 --- a/lib/gitlab/ci/pipeline/chain/validate.rb +++ b/lib/gitlab/ci/pipeline/chain/validate.rb @@ -10,7 +10,7 @@ module Gitlab end def break? - @pipeline.errors.any? || @pipeline.persisted? + @pipeline.errors.any? || @pipeline.persisted? end def allowed_to_trigger_pipeline? diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index 5b959b9a142..6ee75b8fc23 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -481,5 +481,4 @@ describe Ci::CreatePipelineService do end end end - end |