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
This commit is contained in:
commit
a96e96d5c8
|
@ -57,10 +57,12 @@ def spin_for_person(people, random:)
|
|||
people.size.times do
|
||||
person = people.sample(random: random)
|
||||
|
||||
return person unless out_of_office?(person)
|
||||
break person unless out_of_office?(person)
|
||||
|
||||
people -= [person]
|
||||
end
|
||||
|
||||
person
|
||||
end
|
||||
|
||||
def out_of_office?(person)
|
||||
|
|
Loading…
Reference in New Issue