The Judgement of Commodus

Does anyone remember that guy in Gladiator that everyone hated? You know, the guy with the snark face that issued the death of poor Maximus and his family.

Yeah, that guy. His name is Emperor Commodus (or some of you may just know him as actor Joaquin Phoenix).

One of his most notable scenes in the movie is when he spares the life of the protagonist, Maximus, in the gladiator coliseum with a hesistant thumbs up. Way back when, it was common practice called pollice verso among the people of Ancient Rome to determine the fate of a defeated gladitor.

At Robin Powered, although we’re not fighting to the death in front of thousands, we came to the realization that we needed a tool that would determine the fate of a pull request before the final merge.

Most of our developers here make use of git flow so we wanted a process that would ensure that incoming pull requests would undergo a thorough QA process. Our general rule of thumb (dat pun) is once a pull request gets a :+1: from two different developers, it has the green light to get merged into our development branch.

Even with this unwritten process sometimes problems would arise where a developer would overlook things or forget to check for new commits after already giving their approval. Thankfully after Github introduced multiple status checks as well as organization level webhooks I decided it was time to write up an app that would automate this process for us.

Meet commodus, a Sinatra based, Heroku-ready application that ensures your pull requests have the πŸ‘β€™s before merging.

Commodus simply requires a Redis instance, a Github token with repo permissions, and a Github webhook setup to report pull_request and issue_comment to the application.

Once the application is setup, simply open up a new pull request and the status check should look something like:

Then some generous soul(s) comes along and give you the πŸ‘

Great success!

Commodus also takes into account the πŸ‘Ž as well! So if someone thinks your code sucks, they can let commodus know!

Check out the code over at Github for installation and setup instructions.