Commit 8e2aafcd authored by Shinya Maeda's avatar Shinya Maeda

Eliminate condition cases in ci/build.rb

parent 1247ae0d
......@@ -195,11 +195,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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment