mirror of
https://github.com/YunoHost/webhooks.git
synced 2024-09-03 19:56:54 +02:00
[enh] also display issue title
This commit is contained in:
parent
f65548defa
commit
ff00183b45
1 changed files with 2 additions and 1 deletions
|
@ -124,12 +124,13 @@ async def github(request):
|
||||||
user = request.json["sender"]["login"]
|
user = request.json["sender"]["login"]
|
||||||
url = request.json["comment"]["html_url"]
|
url = request.json["comment"]["html_url"]
|
||||||
issue_number = request.json["issue"]["number"]
|
issue_number = request.json["issue"]["number"]
|
||||||
|
issue_title = request.json["issue"]["title"]
|
||||||
comment = request.json["comment"]["body"]
|
comment = request.json["comment"]["body"]
|
||||||
|
|
||||||
if len(comment) > 120:
|
if len(comment) > 120:
|
||||||
comment = comment[:120] + "..."
|
comment = comment[:120] + "..."
|
||||||
|
|
||||||
notify(f"[{repository}] @{user} commented on issue #{issue_number}: {comment} {url}")
|
notify(f"[{repository}] @{user} commented on issue #{issue_number} {issue_title}: {comment} {url}")
|
||||||
|
|
||||||
# https://developer.github.com/v3/activity/events/types/#issuesevent
|
# https://developer.github.com/v3/activity/events/types/#issuesevent
|
||||||
elif hook_type == "issues":
|
elif hook_type == "issues":
|
||||||
|
|
Loading…
Reference in a new issue