[mod] add PR title

This commit is contained in:
Laurent Peuch 2019-02-08 16:10:40 +01:00
parent dc65353f12
commit caa7195b25

View file

@ -214,6 +214,7 @@ async def github(request):
repository = request.json["repository"]["name"]
user = request.json["sender"]["login"]
pull_request_number = request.json["pull_request"]["number"]
pull_request_title = request.json["pull_request"]["title"]
comment = request.json["comment"]["body"].replace("\r\n", " ")
url = request.json["comment"]["html_url"]
@ -222,7 +223,7 @@ async def github(request):
# try to avoid duplicated messages
if action != "created":
notify(f"[{repository}] @{user} {action} a comment on pull request #{pull_request_number}: {comment} {url}", repository=repository)
notify(f"[{repository}] @{user} {action} a commented on pull request #{pull_request_number} {pull_request_title}: {comment} {url}", repository=repository)
# https://developer.github.com/v3/activity/events/types/#pullrequestreviewevent
elif hook_type == "pull_request_review":