summaryrefslogtreecommitdiff
path: root/app/controllers/ci/lints_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/ci/lints_controller.rb')
-rw-r--r--app/controllers/ci/lints_controller.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/ci/lints_controller.rb b/app/controllers/ci/lints_controller.rb
index e782a51e7eb..a7af3cb8345 100644
--- a/app/controllers/ci/lints_controller.rb
+++ b/app/controllers/ci/lints_controller.rb
@@ -6,11 +6,13 @@ module Ci
end
def create
- if params[:content].blank?
+ @content = params[:content]
+
+ if @content.blank?
@status = false
@error = "Please provide content of .gitlab-ci.yml"
else
- @config_processor = Ci::GitlabCiYamlProcessor.new params[:content]
+ @config_processor = Ci::GitlabCiYamlProcessor.new(@content)
@stages = @config_processor.stages
@builds = @config_processor.builds
@status = true