Pr. Police: Keep track of pull-requests waiting for review

Rogério Vicente
Talkdesk Engineering
3 min readAug 18, 2017

--

At Talkdesk we take code reviews very seriously. It’s part of our tech culture and our workflow. We find it’s one of the best tools that engineers can use for self-improvement. It also guarantees top quality in our codebases.

To foster this philosophy, we use Github.

However, as a result, every team has a lot of pull-requests waiting for review. And since every engineer is always busy developing features, fixing bugs etc. it’s hard to keep track of which pull-requests need review, especially if a team owns multiple code repositories (which is the case for most of them).

To solve this problem, I created a tool called Pr. Police during our company’s hackathon.

What is Pr. Police?

To put it simply, Pr. Police is a Slack bot that keeps track of pull-requests waiting for review. So you configure what repositories you want to monitor, set the slack channels that you want the bot to join and send notifications to, and then just label your pull-requests in need of review.

Pullhub does all the work of getting open pull-requests filtered by label(s) in a single or multiple repositories.

Pr. Police is built with Node.js, and at its core uses pullhub: an open-source module built specifically for this project but that can be reused anywhere. Pullhub does all the work of getting open pull-requests filtered by label(s) in a single or multiple repositories. You can use it as a library or a command line tool. This makes it easy for anyone to get the functionality of Pr. Police working on platforms other than Slack.

For your convenience, you can head to the repository page and quickly deploy Pr. Police into an Heroku instance by clicking the button on the repository page. Just fill in the environment variables and you’re all set!

What’s next?

We all on the Callbar team cannot live without this bot anymore. And we’re planning to improve it a lot further.

For now it only does the bare minimum: periodically posting into the channel(s) the pull-requests in need of review, and answering a private chat with the list of pull-requests.

The next big features we hope to design include private/public commands such as recently reviewed pull-requests, list what repositories it’s tracking, add more repositories to track, configurable output formatting and display the recommended reviewers along side each listed pull-request.

Pr. Police is open-source software, so your contributions are welcome! Also the awesome artwork is from Micaela Neto, our Senior Graphic Designer.

--

--

Surfer, Software Engineer, Open-sourcerer. Not necessarily in that order. Creator of http.cat.