Thibaud’s blog

Notes, thoughts, and open-source software

Recipe: code reviews for existing code with GitHub

To me, code reviews are one of the most useful practices of modern software development. It used to be quite tedious to set up tools and a workflow to be able to use them on projects, but with the arrival of PR workflows on platforms like GitHub and GitLab, with built-in code review interfaces, there is no reason not to systematically review code. Make a branch, make a PR, review, merge.

But what if the code to review has already been committed? Sure, GitHub supports commenting on commits, but it becomes quite tedious to have to do this as individual comments scattered across a repository. Instead, here’s a technique I’ve used to leverage GitHub (or GitLab’s) wonderful PR review tools, to look at whole repositories.