How do distributed teams do code reviews?

peiche profile image Paul ・1 min read

Like the title says. My team is all in the same location. We occasionally work remotely, but for the most part we come into the office. When we need to do a peer review, it's done face-to-face. If a team member is remote, the review has to wait until they're back in the office. So I was wondering, how do you do code reviews if the team members don't share a physical location?


markdown guide

Similarly to how you do it in open source projects - one person opens a pull request, another person takes a look at it, writes comments, gives feedback etc. At the end when everything seems good the reviewer approves the pull request and it's merged.


You open a PR, or send patches to whatever mailing list, or however else you submit things for review.

You then proceed to wait for approvals or requests for clarification from responsible parties you flagged for review (or who were flagged automatically), respond as appropriate, and repeat until everyone who needs to review it has.

In the event that you need 'synchronous' communication to explain something in depth, you schedule a time with everyone who needs to be involved and either do a video call, or chat on IRC, or something similar.

Honestly, this is how everyone should be doing it, not just distributed teams. I would go insane working for a company where people couldn't submit reviews if they were working remotely, it seriously hurts efficiency on multiple levels.


Hi Paul, a peer review is a solution to a problem: what problem is it solving for you? This is not a trick question, I'm just trying to work out whether there aren't other solutions to the same problem that could be trialled beside or instead of peer reviews?

p.s. Everything gets harder/slower/messier in distributed environments.


We do it by gitlab. It's open-source and you can host in your company server. There are other pieces of software available both paid and open-source without git. We have kept it simple by gitlab


+1 for GitLab. Even if your team is not remote it makes things mach more transparent for everyone. After years of running the self hosted version we’ve switched to their silver plan because there’s so much value in it.


Gitea is another good option . But I will also +1 for Gitlab


You could also use a video chat app like skype to do the review « face-to-face »


That sounds really laborious and must effect your productivity?

Code reviews should be able to run asynchronously, and shouldn't need the raiser to be in attendance.

What's your workflow/tools?