Skip to content

Tweet After All Commit Messages...have you ever wanted to lose all of your followers by tweeting every single commit message to the world?

License

Notifications You must be signed in to change notification settings

and-computers/HowToTweetEveryCommit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HowToTweetEveryCommit

have you ever wanted to lose all of your followers by tweeting every single commit message to the world?

adapted from: https://gist.github.com/kylefrost/f3841e76749dc64f4b5e

changed to do the actual twitter post in python using Tweepy because the oauth-sign and http-post install from tar.gz was giving me problems and python is just easier. hopefully this makes it a bit more usable for someone else. enjoy!

  1. Get your developer tokens from https://apps.twitter.com/ and make sure your permissions are set to "Read and Write"

get_dev_tokens https://www.slickremix.com/docs/how-to-get-api-keys-and-tokens-for-twitter/

1a. Paste the 4 keys into the post_commit_hook.py in the section below.

def main(): # Get these values from https://apps.twitter.com/ # See more detailed instructions in the README.md cfg = { "consumer_key" : "YOUR VALUE", "consumer_secret" : "YOUR VALUE", "access_token" : "YOUR VALUE", "access_token_secret" : "YOUR VALUE" }
  1. Install dependency (its just tweepy), run pip install -r requirements.txt

  2. Go to the local repository that you want to have commits tweeted from and find the .git folder. Note that most operating systems have folders that start with "." hidden. To unhide folders on Mac OSX press Command+Shift+.

unhide_hidden_folders

  1. Place the 2 files post-commit and post_commit_hook.py from this repository into the your_repo/.git/hooks/ directory

  2. Make the post-commit file executable by running chmod a+x post-commit from within your_repo/.git/hooks/ directory

make_executable_gif

  1. Edit lines 5 and 28 in post-commit file to point to your repository's local directory and repository's git/hooks directory respectively. See below for an example of what your edits might look like:
Line 5: export PATH=$PATH:~/Desktop/Code/MyCodeRepository/.git/hooks Line 28: python ~/Desktop/Code/MyCodeRepository/.git/hooks/post_commit_hook.py $tweet 

Contributing

Its still pretty early but if you have suggestions, thoughts, feedback, criticism, etc feel free to open a PR or submit an Issue.

Thanks in advance 😊


Donating

If ya feeling generous, hollr @ the kid ❤️

https://www.paypal.me/hijodelsol

BTC: 3EbMygEoo8gqgPHxmqa631ZVSwgWaoCj3m

ETH: 0x2F2604AA943dB4E7257636793F38dD3B1808A9e7

LTC: MQVgzNDgw43YzyUg3XmH3jQ7L8ndVswmN3

About

Tweet After All Commit Messages...have you ever wanted to lose all of your followers by tweeting every single commit message to the world?

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published