Created
June 11, 2009 05:15
-
-
Save defunkt/127716 to your computer and use it in GitHub Desktop.
This file contains 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
# the very first post-receive webhook target for github | |
# 2008-01-29 | |
require 'rubygems' | |
require 'sinatra' | |
require 'json' | |
require '/var/www/famspam/production/current/lib/campfire' | |
post '/' do | |
payload = JSON.parse(params[:payload]) | |
messages = [] | |
repository = payload['repository'] | |
payload['commits'].each do |sha, commit| | |
Campfire.notify("[%s] %s - %s %s" % [ repository['name'], commit['author']['name'], commit['message'], commit['url'] ]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment