githook

Simple web application that runs a script in response of GitHub post hook
Download

githook Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Andraz Brodnik
  • Publisher web site:
  • https://bitbucket.org/niteoweb/

githook Tags


githook Description

githook is an application that starts a small web server, reads a INI config file and listens for GitHub post requests, then runs a script in response of the post request.How to install and use- Git clone- cd githook- Create a config.ini (please refer to the example.ini)- run the following commands:- python bootstrap.py -d- bin/buildout- bin/supervisordOR- Install the githook package via pip, easy_install or buildout- githook (script) will appear in you bin PATH- just run githookgithook now listens on port 5000 port for for post request from githubexample.iniExample; This section will match if you push commit or more commits to project/repo "test" branch "master"; You must specify the project/repository namename=test; You must specify your username or the name of the organizationowner=brodul; You must specify branchbranch=master; The command that will be executed on matchcmd=ls; comment# comment; All the sections that match will be executedname=testowner=brodulbranch=mastercmd=pwdname=testowner=brodul; This will match on tag move, delete, create ...tag=trololocmd=pwdGithook command line usageYou can access the help always with the -h or --help optionUsage: githook Options: -h, --help show this help message and exit -c FILE, --config=FILE INI file config -l ADDRESS, --listen=ADDRESS hostname to listen on -p PORT, --port=PORT the port of githook Nginx configurationyou still need to configure nginx or apache to make a proxy passExampleserver { listen 80 ; server_name domain.com; access_log /var/log/nginx/githook.access.log; error_log /var/log/nginx/githook.error.log; location /githook { # Allow github IPs allow 207.97.227.253; allow 50.57.128.197; allow 108.171.174.178; deny all; rewrite /githook / break; proxy_pass http://localhost:5000 ; }Product's homepage


githook Related Software