Show sender of an issue_comment, not the original commenter (for edits)

This commit is contained in:
jesopo 2019-02-26 21:55:34 +00:00
parent cfaf6864fc
commit 120eb03173

View file

@ -521,7 +521,7 @@ class Module(ModuleManager.BaseModule):
action = data["action"] action = data["action"]
issue_title = data["issue"]["title"] issue_title = data["issue"]["title"]
type = "pr" if "pull_request" in data["issue"] else "issue" type = "pr" if "pull_request" in data["issue"] else "issue"
commenter = utils.irc.bold(data["comment"]["user"]["login"]) commenter = utils.irc.bold(data["sender"]["login"])
url = self._short_url(data["comment"]["html_url"]) url = self._short_url(data["comment"]["html_url"])
return ["[%s #%d] %s %s on: %s - %s" % return ["[%s #%d] %s %s on: %s - %s" %
(type, number, commenter, COMMENT_ACTIONS[action], issue_title, (type, number, commenter, COMMENT_ACTIONS[action], issue_title,