gitlab: evenly distribute MRs among reviewers

bss/dr.botzo#8
This commit is contained in:
Brian S. Stephan 2016-09-08 17:36:11 -05:00
parent 2761e2315e
commit b248a47658
1 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ class GitlabBot(object):
if merge_request.assignee is None or merge_request.assignee.username not in review_candidates:
if len(review_candidates) > 0:
new_reviewer = random.choice(review_candidates)
new_reviewer = review_candidates[merge_request.iid % len(review_candidates)]
log.debug("%s is the new reviewer", new_reviewer)
# get the user object for the new reviewer
@ -219,7 +219,7 @@ class GitlabBot(object):
if merge_request.assignee is None or merge_request.assignee.username not in accept_candidates:
if len(accept_candidates) > 0:
new_accepter = random.choice(accept_candidates)
new_accepter = accept_candidates[merge_request.iid % len(accept_candidates)]
log.debug("%s is the new accepter", new_accepter)
# get the user object for the new accepter