def github( -> def webhook( (github.py)

This commit is contained in:
jesopo 2019-01-09 22:47:20 +00:00
parent dc4c711fa0
commit aa04071d89

View file

@ -83,7 +83,7 @@ class Module(ModuleManager.BaseModule):
page.data["title"], url)) page.data["title"], url))
@utils.hook("api.post.github") @utils.hook("api.post.github")
def github(self, event): def webhook(self, event):
payload = event["data"].decode("utf8") payload = event["data"].decode("utf8")
if event["headers"]["Content-Type"] == FORM_ENCODED: if event["headers"]["Content-Type"] == FORM_ENCODED:
payload = urllib.parse.unquote(urllib.parse.parse_qs(payload)[ payload = urllib.parse.unquote(urllib.parse.parse_qs(payload)[