From 81dd0d2bd572975688c5adf09a345170278d45b3 Mon Sep 17 00:00:00 2001 From: Aaron Jones Date: Sun, 30 May 2021 15:55:44 +0000 Subject: [PATCH] GitHub PRs: Correctly attribute PR authors Untested; just judging by the JSON contents of a successfully develivered webhook payload that triggered a misattribution. --- modules/git_webhooks/github.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/git_webhooks/github.py b/modules/git_webhooks/github.py index f02f10eb..6532fa96 100644 --- a/modules/git_webhooks/github.py +++ b/modules/git_webhooks/github.py @@ -275,7 +275,7 @@ class GitHub(object): colored_branch = utils.irc.color(branch, colors.COLOR_BRANCH) sender = utils.irc.bold(data["sender"]["login"]) - author = utils.irc.bold(data["sender"]["login"]) + author = utils.irc.bold(data["pull_request"]["user"]["login"]) number = utils.irc.color("#%s" % data["pull_request"]["number"], colors.COLOR_ID) identifier = "%s by %s" % (number, author)