[enh] handle action label

This commit is contained in:
Laurent Peuch 2019-02-06 12:36:31 +01:00
parent dd9e76620c
commit 13d417d5e3

View file

@ -161,6 +161,15 @@ async def github(request):
else: else:
notify(f"WARNING: unknown 'issues' action: {action}") notify(f"WARNING: unknown 'issues' action: {action}")
# https://developer.github.com/v3/activity/events/types/#labelevent
elif hook_type == "label":
action = request.json["action"]
label = request.json["label"]
repository = request.json["repository"]["name"]
user = request.json["sender"]["login"]
notify(f"[{repository}] @{user} {action} label {label}")
return text("ok") return text("ok")