From 6e90bf241204dcbf464a9086c07bf85cb1f82ed3 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 10 Feb 2020 10:37:27 +0000 Subject: [PATCH] show issue/pr title for issue_comment events --- modules/git_webhooks/github.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/git_webhooks/github.py b/modules/git_webhooks/github.py index a3f51c89..d9925ef0 100644 --- a/modules/git_webhooks/github.py +++ b/modules/git_webhooks/github.py @@ -393,6 +393,7 @@ class GitHub(object): action = data["action"] issue_title = data["issue"]["title"] type = "PR" if "pull_request" in data["issue"] else "issue" + title = data["issue"]["title"] commenter = utils.irc.bold(data["sender"]["login"]) url = self._short_url(data["comment"]["html_url"]) @@ -400,8 +401,9 @@ class GitHub(object): if not action == "deleted": body = ": %s" % self._comment(data["comment"]["body"]) - return ["[%s] %s %s on %s%s - %s" % - (type, commenter, COMMENT_ACTIONS[action], number, body, url)] + return ["[%s] %s %s on %s (%s)%s - %s" % + (type, commenter, COMMENT_ACTIONS[action], number, title, body, + url)] def create(self, full_name, data): ref = data["ref"]