From 13d417d5e30623e8f40324f1fcb57dc46fd21f73 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 6 Feb 2019 12:36:31 +0100 Subject: [PATCH] [enh] handle action label --- server.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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")