Commit 45f1975d authored by Tomasz Maczukin's avatar Tomasz Maczukin Committed by Kamil Trzcinski

Simplify Ci::Build#dependencies method

parent c191c110
......@@ -542,18 +542,13 @@ module Ci
def dependencies
depended_jobs = depends_on_builds
return depended_jobs unless options[:dependencies] && !options[:dependencies].empty?
return depended_jobs unless options[:dependencies].present?
selected = []
depended_jobs.each do |job|
options[:dependencies].each do |job_name|
selected << job if job.name == job_name
depended_jobs.select do |job|
options[:dependencies].include?(job.name)
end
end
selected
end
private
def update_artifacts_size
......
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