diff options
author | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-08-30 15:38:36 +0200 |
---|---|---|
committer | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-07 12:10:49 +0200 |
commit | 0d81fd05b905e5fe41fee6bb48214748ccf85e78 (patch) | |
tree | ecda31a5ba5559754a1e2cbbd9399fb9e9f22bd9 /app/controllers | |
parent | 1a7a900d8e4a4a3a65b33054168fdd86f252b757 (diff) | |
download | gitlab-ce-0d81fd05b905e5fe41fee6bb48214748ccf85e78.tar.gz |
Code refactor
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/ci/lints_controller.rb | 6 |
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' |