Awesome Open Source
Awesome Open Source

⚠️ Pr. Police is deprecated and no longer supported ⚠️

GitHub has incorporated a similar feature and now enables you, your team or organization to be reminded when pull requests are waiting for review.

Pr. Police

Pr. Police logo


Pr. Police is a slackbot that sends to configured slack channels a listing of open pull requests that are waiting for a review. It supports watching multiple repositories, and filtering the pull requests by label.

This project is part of the Talkdesk Hackathon April 2017.

Running the bot

The quick and easy way

The easiest way to get an instance of Pr. Police up and running is to deploy it to Heroku by clicking on the button below.


You'll still need to fill in all the environment variables. For more info on this, head down to the Configuration section.


npm install pr-police


Git clone this repository then:

npm install


npm start

This will start the server locally until Ctrl-C is pressed.

Note: You will need to pass all the required env vars.


Pr. Police has the following environment variables available:


Debug flag used to enable more verbose logging. Default: false


Which days of the week to run on. Default: Monday,Tuesday,Wednesday,Thursday,Friday


The github account token to access the repos. Required.


The slack token for the bot to access your slack team. Required.


The list of repositories to watch. The format is user/repo and comma separated. Required.

Example: rogeriopvl/gulp-ejs,rogeriopvl/pullhub,talkdesk/pr-police


The list of labels that will cause a pull-request to be excluded. So imagine, your team uses the label in-progress for pull-requests not yet requiring review, you'll have to fill in: in-progress. Supercedes GH_LABELS. Multiple labels are comma separated.

Example: do-not-merge,in-progress,needs-work


The list of labels to filter pull-requests. So imagine, your team uses the label needs review for pull-requests waiting for review, you'll have to fill in: needs review. Multiple labels are comma separated. Optional.

NOTE: Omitting both GH_EXCLUDE_LABELS and GH_LABELS will result in all open pull-requests being reported for the specified GH_REPOS.


The list of channel names on your team where Pr. Police will post the announcements. Multiple channels are comma separated. Either SLACK_CHANNELS or SLACK_GROUPS is required.

Example: notifications


The list of private group names on your team where Pr. Police will post the announcements. Multiple channels are comma separated. Either SLACK_CHANNELS or SLACK_GROUPS is required.


The name of your Pr. Police bot on slack. Optional.


URL of the icon for the slack bot when sending messages.


What times of day to run (24-hour format, leading zeroes are not necessary). Multiple times are comma-separated. Default: 0900.


The timezone the server should use. Heroku default is UTC. Uses tz database timezone format. Example: America/Los_Angeles.

Heroku configuration

If heroku attempts to start a web process instead of a worker, you may need to run: heroku ps:scale web=0 worker=1 -a {HEROKU_APP_NAME}


Pr. Police was developed by Rogério Vicente during one of Talkdesk's internal hackathons.

Artwork created by Micaela Neto

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,557,240
Node (13,137
Github (7,809
Slack Bot (993
Pull Requests (608
Related Projects