gitlab-housekeeper: Add support for finding a reviewer and refactoring
What does this MR do and why?
This MR is composed of a few changes:
- The main thing is to automatically assign a reviewer from the group that owns the code being changed
- This prompted a larger refactor because we had to add more data to the
Change
struct. The struct was getting out of hand so we extracted it to a real ruby object that can be built in steps and can also represent some of the transformations we need to do with the data - Adding more behaviour to this
Change
object prompted us to "promote" this object as the primary way of passing data around in thegitlab-housekeeper
gem. So we now passchange
into theGitlabClient
. We plan to use this as a way to reduce the number of arguments being passed around everywhere. If and when theChange
object becomes too complex we likely might want to start extracting mixins and such but for now it seems this design helped simplify method calls
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Edited by Dylan Griffith