[enh] also display issue title

This commit is contained in:
Laurent Peuch 2019-02-06 13:34:19 +01:00
parent f65548defa
commit ff00183b45

View file

@ -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":