Download:
child 223:273b56088235
parent 221:e9237bf3d48e
222:e02db9d564fb
Anton Shestakov <av6@dwimlabs.net>, Wed, 24 Aug 2016 19:37:29 +0800
queue: log event type that hook handlers receive

1 файлов изменено, 3 вставок(+), 0 удалений(-) [+]
hooks-queue.py file | annotate | diff | comparison | revisions
--- a/hooks-queue.py Wed Aug 24 19:29:28 2016 +0800
+++ b/hooks-queue.py Wed Aug 24 19:37:29 2016 +0800
@@ -43,6 +43,8 @@
class BitbucketHookHandler(BaseHookHandler):
def post(self):
+ event = self.request.headers.get('X-Event-Key')
+ logging.debug('%s received event %r', self.__class__.__name__, event)
payload = self.parse_json_payload()
base = {
'url': payload['repository']['links']['html']['href'],
@@ -69,6 +71,7 @@
class GithubHookHandler(BaseHookHandler):
def post(self):
event = self.request.headers.get('X-GitHub-Event')
+ logging.debug('%s received event %r', self.__class__.__name__, event)
getattr(self, 'handle_' + event, self.unknown_event)()
def handle_ping(self):