From d9122dc71fc89f684d1078b15f342893ab990edc Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 6 Feb 2019 12:40:04 +0100 Subject: [PATCH] [enh] handle milestone event --- server.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server.py b/server.py index b8d2932..69e7ba9 100644 --- a/server.py +++ b/server.py @@ -170,6 +170,15 @@ async def github(request): notify(f"[{repository}] @{user} {action} label {label}") + # https://developer.github.com/v3/activity/events/types/#milestoneevent + elif hook_type == "milestone": + action = request.json["action"] + repository = request.json["repository"]["name"] + user = request.json["sender"]["login"] + milestone = request.json["milestone"]["title"] + + notify(f"[{repository}] @{user} {action} milestone {milestone}") + return text("ok")