Last active
August 29, 2015 14:04
-
-
Save dux/06978cdb71c12fbd1ac8 to your computer and use it in GitHub Desktop.
StashBuckets.com post commit hook wor Work Logs app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# create .git/hooks/post-commit | |
# chmod +x .git/hooks/post-commit | |
# http://githooks.com/ | |
# to test if it works just run ".git/hooks/post-commit" and it should post last git commit | |
require 'net/http' | |
require 'uri' | |
require 'colorize' # gem install colorize | |
msg = `git log -1 HEAD` | |
uri = URI('http://stashbuckets.com/buckets/ralpapoi/work_logs') # URL to your work log | |
res = Net::HTTP.post_form(uri, { 'commit'=>msg }) | |
puts res.body.green |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment