summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorKatarzyna Kobierska <kkobierska@gmail.com>2016-08-30 15:38:36 +0200
committerKatarzyna Kobierska <kkobierska@gmail.com>2016-09-07 12:10:49 +0200
commit0d81fd05b905e5fe41fee6bb48214748ccf85e78 (patch)
treeecda31a5ba5559754a1e2cbbd9399fb9e9f22bd9 /app/controllers
parent1a7a900d8e4a4a3a65b33054168fdd86f252b757 (diff)
downloadgitlab-ce-0d81fd05b905e5fe41fee6bb48214748ccf85e78.tar.gz
Code refactor
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/ci/lints_controller.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/ci/lints_controller.rb b/app/controllers/ci/lints_controller.rb
index 62f6b23faba..e06d12cfce1 100644
--- a/app/controllers/ci/lints_controller.rb
+++ b/app/controllers/ci/lints_controller.rb
@@ -8,14 +8,12 @@ module Ci
def create
@content = params[:content]
@error = Ci::GitlabCiYamlProcessor.validation_message(@content)
+ @status = @error.blank?
- unless @error.blank?
- @status = @error.blank?
- else
+ if @error.blank?
@config_processor = Ci::GitlabCiYamlProcessor.new(@content)
@stages = @config_processor.stages
@builds = @config_processor.builds
- @status = true
end
rescue
@error = 'Undefined error'