So how do you know who to contact if you need a pair of eyes on your merge request?

Meet Reviewer Roulette!

Reviewer Roulette is a Slack slash command to help GitLabbers randomly select a person from a given team, which can be especially useful as multiple teams work together to deliver features in a single merge request.

The idea

It's quite common to find that your issue or merge request will have multiple labels to associate different feature areas and teams that are contributing to them. As someone who's recently joined GitLab, I'm still getting to know all the different teams and people that work at GitLab. That said, I'm working on a feature with the CI/CD or discussion team, who should I reach out to if I have questions or need a review of my work?

The idea arose from the frontend team weekly call where Tim Zallmann reminded us that, "Everyone on the frontend team is a reviewer." The team previously had a microservice built by Luke Bennett for this, however, it's no longer online. Beyond that, wouldn't it be convenient to simply type a command in Slack to be suggested someone to ping for a review?

I can say with confidence that GitLab is a company that truly exemplifies its values, and I was empowered by the value of collaboration to build something that could help our team (and others!) find reviewers. I couldn't be the only one who had this problem!

Do it yourself Our collaboration value is about helping each other when we have questions, need critique, or need help. No need to brainstorm, wait for consensus, or do with two what you can do yourself.

I quickly went to work to (hastily) put together a proof-of-concept to see if it would something that people would want to use.

Decision fatigue, be gone!

It was presented to the frontend team and received warmly, and many people were keen to contribute and also suggest ideas that would make it even more useful!

Although it was originally intended for the frontend group, since I was building it from scratch, it was very easy to make the decision to have it work for all engineering teams.

With Reviewer Roulette, I don't have to ping entire Slack channels or guess from our team page to try to find someone to talk to.

Additionally, it provides a number of other benefits such as:

It promotes a more balanced distribution of reviewers amongst the team.

Less experienced reviewers have more opportunities to do code reviews

More experienced reviewers are not as heavily relied on

It allows more team members to learn more about parts of the codebase they may not be as familiar with, increasing the knowledge of the team overall

It reduces bias towards reviewers that you may unconsciously prefer to select

Of course, we have our various subject matter experts such as our frontend domain experts and gitlab-ce maintainers who may provide the best insight for a given topic, but it's good to randomly select reviewers by default!

How it's made

When it came to thinking about how to build Reviewer Roulette, it wasn't so much about the tech, than it being about being enabled to create something that will benefit the team.

Embracing our value of efficiency, the solution is very much a boring one. It's a simple Node.js application utilizing js-yaml and express to be able to search our team structure file and respond to Slack's slash command requests properly.