A twitter bot that wishes pull requests happy birthday if they're still open N years after they were created.
https://twitter.com/PR_birthday_bot
You should have Python 2 and pip installed on your system.
Install the dependencies with pip install requirements.txt
To set up on a local machine for development/testing:
-
Set up an app for your twitter developer account.
-
Set
TWITTER_CONSUMER_KEY
andTWITTER_CONSUMER_SECRET
environment variables using the keys twitter gives you. E.g. runexport TWITTER_CONSUMER_KEY=blablabla
in your shell. -
Grant the app access to your twitter account. There's a button for this in the twitter settings. To grant access to a different account you can hack
birthdaybot.py
to run thefetch_twitter_access_token
function. -
Set
TWITTER_ACCESS_KEY
andTWITTER_ACCESS_SECRET
environment variables with the values from step 3. -
Run
python birthdaybot/birthdaybot.py
First create a heroku app and push the repo to heroku. It will complain about a missing Procfile but it's not needed.
The rest you can do either through the heroku web interface or the cli:
- set the four twitter environment variables described above
- add the heroku scheduler plugin to the app
- add a job to the scheduler plugin. It should run
./bin/birthdaybot.py
- Feel free to raise PRs and issues
- I will try and respond to things within a year
- Check the PRs the bot tweets about and see if you can get one resolved
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.