Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Experimental sinatra app to receive post-receive-hooks from github
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
hooks/post-receive
COPYING
Gemfile
Gemfile.lock
README.markdown
config.rb
hooks_receiver.rb

README.markdown

github-hooks-receiver is a simple (and experimental) sinatra app to receive post-receive-hooks from github read more about post-receive-hooks here http://help.github.com/post-receive-hooks/

how to use?

1 - clone this git repo:
$ cd ~
$ git clone git://github.com/lucasdavila/github-hooks-receiver.git
$ cd github-hooks-receiver

2 - create your hooks in hooks/post-receive folder (this file is a shell script aka sh), ex:
$ touch hooks/post-receive/my_hook
$ nano hooks/post-receive/my_hook

//now add your commands
cd /path/to/my/app-project
git reset --hard
git pull origin master

//and save your hook pressing
ctrl + x
y

//remember this file need execution permission, to check permissions execute:
$ ls -la

//to add execution permission execute:
$ sudo chmod +x my_hook_file_name

3 - install dependencies (you must have installed ruby )
$ bundle install

4 - run your server
$ ruby hooks_receiver.rb

5 - add your post-receive-hook url to github hooks page
ex url: http://your-host/post-receive/
github hooks page: https://github.com/your_user/your_project/admin/hooks

yep :) now your can receive post-receive-hooks from github.

Something went wrong with that request. Please try again.