Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarzyna Kobierska <kkobierska@gmail.com>2016-08-29 16:07:19 +0300
committerKatarzyna Kobierska <kkobierska@gmail.com>2016-09-07 13:10:49 +0300
commit2c8b830fdbf749e8bb7461d5c3ce4699b77ce3ca (patch)
tree10e0c44ca36349acf1378d3191267c9d1493b321 /app/controllers/ci
parentbbba62fa51419b14be4f39873afdd45b5b248764 (diff)
Code refactoring
Diffstat (limited to 'app/controllers/ci')
-rw-r--r--app/controllers/ci/lints_controller.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/controllers/ci/lints_controller.rb b/app/controllers/ci/lints_controller.rb
index fa57e6c5e14..62f6b23faba 100644
--- a/app/controllers/ci/lints_controller.rb
+++ b/app/controllers/ci/lints_controller.rb
@@ -7,13 +7,10 @@ module Ci
def create
@content = params[:content]
+ @error = Ci::GitlabCiYamlProcessor.validation_message(@content)
- if @content.blank?
- @status = false
- @error = "Please provide content of .gitlab-ci.yml"
- elsif !Ci::GitlabCiYamlProcessor.errors(@content).nil?
- @status = false
- @error = Ci::GitlabCiYamlProcessor.errors(@content)
+ unless @error.blank?
+ @status = @error.blank?
else
@config_processor = Ci::GitlabCiYamlProcessor.new(@content)
@stages = @config_processor.stages