Commit a96e96d5 authored by James Lopez's avatar James Lopez

Merge branch 'fix-danger-when-nobody-in-category' into 'master'

Fix reviewer roulette when no-one is in a category

See merge request gitlab-org/gitlab-ce!27895
parents 56c8b35b 60525148
...@@ -57,10 +57,12 @@ def spin_for_person(people, random:) ...@@ -57,10 +57,12 @@ def spin_for_person(people, random:)
people.size.times do people.size.times do
person = people.sample(random: random) person = people.sample(random: random)
return person unless out_of_office?(person) break person unless out_of_office?(person)
people -= [person] people -= [person]
end end
person
end end
def out_of_office?(person) def out_of_office?(person)
......
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