Skip to content

Instantly share code, notes, and snippets.

View willyanez's full-sized avatar
💭
Con las manos en el código

William Yanez willyanez

💭
Con las manos en el código
View GitHub Profile
@willyanez
willyanez / reviews.rb
Last active July 18, 2022 17:52
Assignment of code reviewers
DEBUG = false
MAX_ASSIGNED = 2
reviewers = %i[Diego Maco Rodrigo Mauricio Rubén Maximus Julián Jaime William Nelson]
reviewers_assigned = {}
# performs the assignment of reviewers taking into consideration the following conditions:
# 1) A reviewer must have 2 and only 2 developers assigned to review which are randomly selected.
# 2) A reviewer cannot review himself.
# 3) if an impossible allocation is found (there is only 1 available dev and it is the same or has already been taken by it) the process is started again.
loop do