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

Simplify Ci::Build#dependencies method

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