[enh] handle milestone event

This commit is contained in:
Laurent Peuch 2019-02-06 12:40:04 +01:00
parent e136c96333
commit d9122dc71f

View file

@ -170,6 +170,15 @@ async def github(request):
notify(f"[{repository}] @{user} {action} label {label}") 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") return text("ok")