Scrapes provided Github repos, looking for pull requests that been an individual has been tagged as a reviewer, and sends an SMS message to a provided telephone number for alerting via Twilio. Useful for the times were there are lots of emails indicating pull requests but few with you as the reviewer. This is to cut through the noise.
pip3 install PyGithub
pip3 install pyyaml
pip3 install twilio
- https://pygithub.readthedocs.io/en/latest/index.html
- https://pyyaml.org/wiki/PyYAMLDocumentation
- https://www.twilio.com/docs/libraries/python
- Create a Github personal access token and add the repos you wanted monitored
- Create a Twilio account, register a telephone number (see
from_phone_number
below), and provide a phone number to where the SMS messages should be sent (seeto_phone_number
) - Create a config.yml file
github:
personal_access_token: 'dfhds;jfhrjhjf;djsf;djhf;jdhfjdfhruywufhwc'
repos:
- 'Project/repo1'
- 'Project/repo2'
login: 'your_username'
twilio:
from_phone_number: '+12345678901'
to_phone_number: '+13456789012'
account_sid: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678'
auth_token: '0123456789abcdefghijklmnopqrstuv'
An optional Github configuration is skip_pulls
, which allows you to specify any pull requests to not send notifications for. Helpful for PRs that have been parked for one reason or another and you don't need to be constantly reminded about it.
skip_pulls:
- <PR Number>
The setting below runs M-F from 8am until 6PM
0 8-18 * * 1-5 cd <path/to/github_review_scrape> && ./pull_request.py