What do you think is the most typical reason for delays in pull request reviews? A study at Google confirms that itās the sizeāthe more changes, the slower the review. Another study shows that itās the emotional toneāanger and dominance expressed in comments are linked to a lower likelihood of a pull request being merged. A more recent study finds that itās the authorās reputation: we merge PRs faster if we know the author. All of the above is true. In our projects, though, what often slows down PR reviews is the message: āCI failures are not related to my changes!ā
Hereās how it happens: You fork a repo. You make changes to fix a bug or introduce a new feature. You commit them and push. You submit a pull request. You realize that some GitHub CI jobs fail. You read the logs. You donāt see any relevance between the error messages and your edits. You post a comment: āCI failures are not related to my changes!ā You expect us to merge your pull request.
Why shouldnāt we?
We donāt merge them. We ask you to step backāto the point before you started making changes. Donāt make them yet. Instead, check the build status of the repository. Pay attention to all CI jobs, not just the one running Maven. They all must be green. Only when all jobs are green should you start editing the code. If any job is red, report a bug and wait until the team gets everything passing.
Why? Because we try to reduce the effort required to fix the build. The more changes we pile onto a broken build, the higher the cost of cleaning it up. When the build is broken, we accept no new changesāexcept those that fix the build.
What if the team takes too long to fix it? What if the build never becomes green? Stillāyou wait. You donāt submit a pull request to a repository with a broken build.
You may fix the build yourself. If you do, submit it in a separate pull request. Donāt mix build-fixing changes with any other edits.
