Everyone can contribute - anonymously! Or, blind code review
Description
Per https://twitter.com/richardkmichael/status/978723259825836032 https://blog.mozilla.org/blog/2018/03/08/gender-bias-code-reviews/
Unconscious bias can affect the performance of a reviewer during code review.
Proposal
A simple idea is to add a "Request anonymous review" checkbox when creating a merge request. If checked, the merge request screen would then conceal most identity-related fields from users who are not the author by default, including:
- Name and avatar of author
- Name and avatar in MR and commit notes (including system notes)
- Name and avatar of assignee (we'd have an "assign back to author" function instead)
- For MRs submitted from forks in a personal namespace, the personal namespace of the fork
- Name, email, GPG signatures in commits list
- Name and avatar in pipelines list
- Name and avatar in "participants"
- Anything else?
The default value could be a project setting.
This mechanism can't be perfect, and it's impossible to prevent the reviewer from consciously seeking out and finding the submitter's GitLab username, and from there, their identity, so this can't do anything about conscious bias.
Once the MR is approved, but before it is merged, we would reveal the identity. This would allow DCOs, copyright assignments, Signed-Off-by headers, etc, to be validated.
We could also add an explicit control for the reviewer to flip the setting and add a system note when it's used, to cover cases where the identity needed to be revealed for one reason or another, or perhaps cases where the reviewer decides to enable the setting and pass the review onto someone else to do in an unbiased fashion.
Whether we'd use this ourselves at GitLab is another question ^^