What is a Pull Request?
In its simplest form, a pull request is a mechanism that allows a developer to notify other developers and stakeholders in the DevOps pipeline that:
All the changes needed for a feature have been completed;
Changes are ready for testing and validation;
And, once changes are approved, they will get merged to the destination branch.
A pull request is much more than a change though.
It is the whole space or a project in which a change resides during its life cycle. Every stakeholder can comment in a pull request. Multiple commits can be done in a pull request with a back and forth feedback loop. Even incomplete code can be committed to a pull request if a developer needs help from another team member.
Every innovation big or small is creative destruction.
Pull requests are also destroying a lot of legacy artifacts and creating space for new ones.
Farewell Legacy Processes and Tools
So Long Permanent Branches
Branching for a long-time was considered the Swiss Amy Knife of source-code control systems. They were used in a myriad of ways:
- Branches for features
- Branches for developers
- Branches for different environments
- Branches for major releases
- Branches because someone in the development team felt like having a branch
Due to this indiscriminate use, branching became a disaster.
The primary weakness in branching strategy which made branching dangerous was the permanent nature of branches.
However, as soon as branches are made ephemeral, all the negative effects of branching disappear. This is made possible by associating a branch with a pull request.
Pull request is a dynamic artifact that is created for a purpose. As soon as purpose (the successful merge) is served, the pull request life-cycle gets over. If a branch is associated with a pull request, it will have a coincidental life-cycle with the pull request.