One of the things I really enjoy about working in the Envato Marketplace development team is the opportunity to learn and to teach via pull requests (PRs) and code reviews. Although the main reason we use pull requests is to obtain approval for production deployment, a useful indirect benefit is the transfer of knowledge within the development team.
Pull Request Lifecycle
In the development team we use GitHub to manage our code and the pull request functionality is a large part of our process. Every change in the codebase is put up for review on GitHub before it is merged into the master codebase and deployed to the web servers.
The main reason we use PRs is to get other developers’ approval for the code to go into production. This approval is usually given via a “plus one” (+1). It is up to the developer to decide how many +1s they need before they merge and deploy their code. Generally, the more large and complex the piece, the more +1s are required.
How does one get a +1? When a developer comments with a +1, they are saying “I am willing to support this code in production”. It must meet their idea of quality. From the overall architectural decisions made in your code, right down to whitespace formatting - everything is up for comment.
This graph is of our PR comments, the thickness of the lines reflect the number of comments from one developer to another’s pull request.
However, what it represents is of more importance. It represents knowledge sharing, teaching and learning.