Created
          February 18, 2010 23:19 
        
      - 
      
- 
        Save defunkt/308202 to your computer and use it in GitHub Desktop. 
    The first GitHub webhook consumer (Campfire Notifier)
  
        
  
    
      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
    
  
  
    
  | 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'], com | |
| end | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment