Eliminate condition cases in ci/build.rb

This commit is contained in:
Shinya Maeda 2017-06-27 15:50:24 +09:00
parent 6e8ea52be6
commit c1388df040

View file

@ -192,11 +192,8 @@ module Ci
variables += yaml_variables
variables += user_variables
variables += project.secret_variables_for(ref).map(&:to_runner_variable)
if trigger_request
variables += trigger_request.user_variables
elsif pipeline.pipeline_schedule
variables += pipeline.pipeline_schedule.variables.map(&:to_runner_variable)
end
variables += trigger_request&.user_variables || []
variables += pipeline.pipeline_schedule&.variables&.map(&:to_runner_variable) || []
variables
end