diff --git a/server.py b/server.py index 65a1d98..49545a1 100644 --- a/server.py +++ b/server.py @@ -161,6 +161,15 @@ async def github(request): else: 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")