rsandell commented on New Feature JENKINS-8226

Since I don't have time to implement it I could give some hints

ToGerritRunListener is the central hub for coordinating when builds starts and completes.
when all builds for a GerritEvent are completed then NotificationFactory.queueBuildCompleted will be called that will add a BuildCompletedCommandJob to a processing queue for outgoing Gerrit commands. When it is processed it will calculate the final score(s) to send with the help of some other utility classes.

So you could either create a new CommandJob type that gathers the list of reviewers depending on the outcome from all builds and sends a set-reviewers command. Or add to the BuildCompletedcommandJob to also send a set-reviewers command.
I don't know which approach would be best, I think I would prefer the first alternative, but it could be a bit complex to realize compared to adding to the previous command since it has already done most of the calculations needed.

The configuration would be quite straight forward; the Config class holds the central configuration for how the commands themselves should look and the GerritTrigger class holds the configuration for each job.

Just send me a mail if you have any questions!
/B

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to