[llvm] Fix "author" handling in GitHub PR Greeter (PR #197140)

Andrzej WarzyƄski via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 03:21:22 PDT 2026


https://github.com/banach-space created https://github.com/llvm/llvm-project/pull/197140

This is a follow-up to #194307 and fixes the issue reported in:
  * https://github.com/llvm/llvm-project/pull/194307#issuecomment-4426270256

Use the same author-detection logic in `PRGreeter` as in
`PRBuildbotInformation`, so both components handle PR authors consistently.


>From a1c7b26f1278431af5b222ebde14051febf0528f Mon Sep 17 00:00:00 2001
From: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: Tue, 12 May 2026 11:16:00 +0100
Subject: [PATCH] Fix "author" handling in GitHub PR Greeter

This is a follow-up to #194307 and fixes the issue reported in:
  * https://github.com/llvm/llvm-project/pull/194307#issuecomment-4426270256

Use the same author-detection logic in `PRGreeter` as in
`PRBuildbotInformation`, so both components handle PR authors consistently.
---
 llvm/utils/git/github-automation.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index bbd029e59cfbc..d1e5f7b778eaf 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -245,10 +245,10 @@ def get_user_values_str(values: list) -> str:
 class PRGreeter:
     COMMENT_TAG = "<!--LLVM NEW CONTRIBUTOR COMMENT-->\n"
 
-    def __init__(self, token: str, repo: str, pr_number: int):
+    def __init__(self, token: str, repo: str, pr_number: int, author: str):
         repo = github.Github(auth=github.Auth.Token(token)).get_repo(repo)
         self.pr = repo.get_issue(pr_number).as_pull_request()
-        self.author = self.pr.user
+        self.author = author
 
     def run(self) -> bool:
         # We assume that this is only called for a PR that has just been opened
@@ -963,7 +963,7 @@ def request_release_note(token: str, repo_name: str, pr_number: int):
     )
     pr_subscriber.run()
 elif args.command == "pr-greeter":
-    pr_greeter = PRGreeter(args.token, args.repo, args.issue_number)
+    pr_greeter = PRGreeter(args.token, args.repo, args.issue_number, args.author)
     pr_greeter.run()
 elif args.command == "commit-request-greeter":
     commit_greeter = CommitRequestGreeter(args.token, args.repo, args.issue_number)



More information about the llvm-commits mailing list