Work in Progress
This is just a quick and dirty hack, and it sure has security issues. I’d appreciate your feedback, please fork it and send me a pull-request in github.
Copyright and Legal Stuff
Well, first of all you need ssh access to a webserver where your copy of your github repo will live in.
- Git (DUH!)
- gem install sinatra yaml json
Now you should ssh into the server and generate a public/private pair of keys, without pass-phrase:
Now copy the content of your public key (
cat .ssh/id_rsa.pub) and paste it as a new Deploy key in your github admin panel.
Now create a folder to host all your repositories. Mine is ~/git/ and save it for later. The clone your github repository.
Now you should deploy this sinatra app. Since I use dreamhost, I followed this instructions
Remember to edit repos.yml with the folder that host all your git repos, and the pair of remote: local repository names. (Probably the same.) Your remote name can be found in http://github.com/username/remote/ and your local name is the folder that contains your git repo.
Now go to Github admin panel, and add a new webhook service with the URL your sinatra app lives in.
And that’s it!