Safely Automerging Git Branches With RultorPosted on:
Your master branch should always be clean, and pull-requests have the risk of breaking that. Luckily a tool named Rultor is here to help…
Continuous integration & delivery are brilliant tools that allows us to ensure a software product is always ready to release. Using an external build server to make daily (or more regular!) builds of your source code lets everybody on a team know the health of the product - is it building for all platforms? Are all the tests passing, and in a timely manner?
It’s trivial to link a public GitHub account to somewhere like Travis, which can let you know within minutes of your commit if you’re going to see that dreaded or not.
But wait, why should you only know this AFTER the fact? Why not find out if a build is failing before allowing commits to
master, and rejecting it right there? This is where Rultor comes in to save the day.
Rultor is a GitHub bot made by the guys at Teamed.io which, when given a command on a pull request in GitHub, will download the pull request, merge with master, and run its own Dockerised build and test. If any issue occurs, it will immediately leave a comment telling you so, with a link to the build log. If everything is A-okay however, Rultor will accept the pull-request for you immediately.
Of course, there’s quite a lot more to it than just this - Rultor needs to know who it can accept merge requests from, and must be a collaborator on your repository.
To explain it better, I’ve set up an example GitHub repository here that shows off how to get started with Rultor and use it on your own projects.