--- a/hooks-queue.py Wed Aug 24 11:01:41 2016 +0800
+++ b/hooks-queue.py Wed Aug 24 11:20:12 2016 +0800
+class GithubHookHandler(BaseHookHandler):
+ payload = json.loads(self.request.body)
+ 'url': payload['repository']['html_url'],
+ 'repo': payload['repository']['name'],
+ 'timestamp': timestamp(),
+ ref = payload['ref'].rpartition('/')[-1]
+ self.push(base, changes)
class CandolintHooks(Application):
def __init__(self, rconn, debug):
URLSpec(r'/bitbucket', BitbucketHookHandler),
+ URLSpec(r'/github', GithubHookHandler),
super(CandolintHooks, self).__init__(handlers, debug=debug)