mirror of
https://github.com/YunoHost/webhooks.git
synced 2024-09-03 19:56:54 +02:00
[enh] handle action label
This commit is contained in:
parent
dd9e76620c
commit
13d417d5e3
1 changed files with 9 additions and 0 deletions
|
@ -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")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue