Enforceable code review with ReviewNinja
At ReviewNinja we often get the question, especially from enterprise teams. “How can we restrict merging before a review of a pull request has succeeded?”.
This is a feature request we have always hesitated to implement in ReviewNinja. A superficial disabling of the merge button would hardly be a proper solution, such a restriction could be easily circumvented by merging in git itself, or even easier, in GitHub. The right solution would need to address this problem on a lower level, at the git level itself.
And now with GitHub Protected Branches it is possible to enforce ReviewNinja code review. Additionally you can also enforce any tool integrated with the GitHub Status API, such as Travis, Coveralls, and many more.
How to enforce ReviewNinja code review
In your GitHub repo settings, open the “Branches” tab, and in the dropdown choose a branch to protect. Good candidates for protection are your develop, master, and/or release branch. Select both “Protect this branch” and “Require status checks to pass before merging”, you should then see a list of pre-existing statuses, select “code-review/reviewninja” (along with any other desired status checks), and save.
Now, whenever a merge is attempted into this branch, the merge will be rejected until all required statuses have succeeded. Furthermore force pushes to this branch will always be rejected, even merges directly in git will be blocked when pushed to your GitHub remote.
Et Voila
With GitHub, and some help from ReviewNinja, you can ensure the right quality checks are in place before successful deployments. We hope to see this feature soon in GitHub Enterprise where we expect it’s impact to be even greater.