[llvm] Update GitHub PR Greeter (PR #194307)
Andrzej Warzyński via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 23:55:57 PDT 2026
https://github.com/banach-space updated https://github.com/llvm/llvm-project/pull/194307
>From 22c1d488599a4d401adea70ae25d765e6199b187 Mon Sep 17 00:00:00 2001
From: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: Sun, 26 Apr 2026 14:35:12 +0100
Subject: [PATCH 1/7] Update GitHub PR Greeter
Following these two discussions:
* https://discourse.llvm.org/t/rfc-mention-our-ai-policy-in-the-greeting-message-for-first-time-contributors/
* https://discourse.llvm.org/t/concerns-about-influx-of-ai-generated-bug-fixes/
Add a reference to the LLVM AI policy. In addition:
* Update the message to include links to other relevant policies as
well, since these are often shared during PR review.
* Remove the note about adding reviewers, since most projects now use
code owners and reviewers are added automatically.
* Add `Hello @{self.author} :wave:` to make the greeting more personal.
---
llvm/utils/git/github-automation.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index b9b5e92de3c97..8f3e47e6073a8 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -245,9 +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, pr_number: int):
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
def run(self) -> bool:
# We assume that this is only called for a PR that has just been opened
@@ -257,19 +258,18 @@ def run(self) -> bool:
comment = f"""\
{PRGreeter.COMMENT_TAG}
-Thank you for submitting a Pull Request (PR) to the LLVM Project!
+Hello @{self.author} :wave:
-This PR will be automatically labeled and the relevant teams will be notified.
+Thank you for submitting a Pull Request (PR) to the LLVM Project. Since this is your first PR, here are a few useful links covering our main contribution policies and review practices.
-If you wish to, you can add reviewers by using the "Reviewers" section on this page.
+* All contributions to LLVM must follow our [LLVM AI Tool Use Policy](https://llvm.org/docs/AIToolPolicy.html). In particular, if you used AI while working on this PR, please add a note to the PR summary.
+* The [LLVM Code-Review Policy and Practices](https://llvm.org/docs/CodeReview.html) document contains practical information about the PR process, including how patches are reviewed and accepted, and who can review a PR
+* Our [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html) describes our expectations for code quality and commit/PR summaries, and also includes information on obtaining commit access.
-If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using `@` followed by their GitHub username.
+If you have questions, feel free to leave a comment on this PR, or ask on [LLVM Discord](https://discord.com/invite/xS7Z362) or [LLVM Discourse](https://discourse.llvm.org/).
-If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.
-
-If you have further questions, they may be answered by the [LLVM GitHub User Guide](https://llvm.org/docs/GitHub.html).
-
-You can also ask questions in a comment on this PR, on the [LLVM Discord](https://discord.com/invite/xS7Z362) or on the [forums](https://discourse.llvm.org/)."""
+Thank you,
+The LLVM Community"""
self.pr.as_issue().create_comment(comment)
return True
>From c7d39e0a09482549a391aa0d1c07e88f4681a5ed Mon Sep 17 00:00:00 2001
From: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: Mon, 27 Apr 2026 18:16:04 +0100
Subject: [PATCH 2/7] Address PR comments
---
llvm/utils/git/github-automation.py | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index 8f3e47e6073a8..b19e5e80411ac 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -245,7 +245,7 @@ def get_user_values_str(values: list) -> str:
class PRGreeter:
COMMENT_TAG = "<!--LLVM NEW CONTRIBUTOR COMMENT-->\n"
- def __init__(self, token: str, repo, pr_number: int):
+ def __init__(self, token: str, repo: str, pr_number: int):
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
@@ -256,20 +256,34 @@ def run(self) -> bool:
# This text is using Markdown formatting.
- comment = f"""\
+ comment_missing_email = ""
+ if self.author.email is None:
+ comment_missing_email = f"""\
+---
+
+It looks like your GitHub email is not public. Before proceeding, please update your settings so that it is public:
+* https://llvm.org/docs/DeveloperPolicy.html#email-addresses
+
+---
+"""
+
+ comment = (
+ f"""\
{PRGreeter.COMMENT_TAG}
Hello @{self.author} :wave:
Thank you for submitting a Pull Request (PR) to the LLVM Project. Since this is your first PR, here are a few useful links covering our main contribution policies and review practices.
-* All contributions to LLVM must follow our [LLVM AI Tool Use Policy](https://llvm.org/docs/AIToolPolicy.html). In particular, if you used AI while working on this PR, please add a note to the PR summary.
+* All contributions to LLVM must follow our [LLVM AI Tool Use Policy](https://llvm.org/docs/AIToolPolicy.html). In particular, if you used AI while working on this PR, please add a note to the PR description.
* The [LLVM Code-Review Policy and Practices](https://llvm.org/docs/CodeReview.html) document contains practical information about the PR process, including how patches are reviewed and accepted, and who can review a PR
-* Our [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html) describes our expectations for code quality and commit/PR summaries, and also includes information on obtaining commit access.
-
-If you have questions, feel free to leave a comment on this PR, or ask on [LLVM Discord](https://discord.com/invite/xS7Z362) or [LLVM Discourse](https://discourse.llvm.org/).
+* Our [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html) describes our expectations for code quality and commit summaries, and also includes notes on our CI system.
+If you have questions, feel free to leave a comment on this PR, or ask on [LLVM Discord](https://discord.com/invite/xS7Z362) or [LLVM Discourse](https://discourse.llvm.org/)."""
+ + comment_missing_email
+ + f"""\
Thank you,
The LLVM Community"""
+ )
self.pr.as_issue().create_comment(comment)
return True
>From 09dc23868491b7af08e881e8f51d86f015c82bdd Mon Sep 17 00:00:00 2001
From: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: Tue, 28 Apr 2026 10:26:26 +0100
Subject: [PATCH 3/7] Revert the logic with self.author.email
---
llvm/utils/git/github-automation.py | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)
diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index b19e5e80411ac..be09705960eeb 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -256,19 +256,7 @@ def run(self) -> bool:
# This text is using Markdown formatting.
- comment_missing_email = ""
- if self.author.email is None:
- comment_missing_email = f"""\
----
-
-It looks like your GitHub email is not public. Before proceeding, please update your settings so that it is public:
-* https://llvm.org/docs/DeveloperPolicy.html#email-addresses
-
----
-"""
-
- comment = (
- f"""\
+ comment = f"""\
{PRGreeter.COMMENT_TAG}
Hello @{self.author} :wave:
@@ -276,14 +264,12 @@ def run(self) -> bool:
* All contributions to LLVM must follow our [LLVM AI Tool Use Policy](https://llvm.org/docs/AIToolPolicy.html). In particular, if you used AI while working on this PR, please add a note to the PR description.
* The [LLVM Code-Review Policy and Practices](https://llvm.org/docs/CodeReview.html) document contains practical information about the PR process, including how patches are reviewed and accepted, and who can review a PR
-* Our [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html) describes our expectations for code quality and commit summaries, and also includes notes on our CI system.
+* Our [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html) describes our expectations for code quality and commit summaries, your GitHub settings (see e.g. [Email Addresses](https://llvm.org/docs/DeveloperPolicy.html#email-addresses)) and also includes notes on our CI system.
+
+If you have questions, feel free to leave a comment on this PR, or ask on [LLVM Discord](https://discord.com/invite/xS7Z362) or [LLVM Discourse](https://discourse.llvm.org/).
-If you have questions, feel free to leave a comment on this PR, or ask on [LLVM Discord](https://discord.com/invite/xS7Z362) or [LLVM Discourse](https://discourse.llvm.org/)."""
- + comment_missing_email
- + f"""\
Thank you,
The LLVM Community"""
- )
self.pr.as_issue().create_comment(comment)
return True
>From 3a8daae383f4e6773b695a741459b37590562f9d Mon Sep 17 00:00:00 2001
From: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: Wed, 29 Apr 2026 08:07:40 +0100
Subject: [PATCH 4/7] Address comments from Victor
---
llvm/utils/git/github-automation.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index be09705960eeb..b22b2bdaa12de 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -262,8 +262,8 @@ def run(self) -> bool:
Thank you for submitting a Pull Request (PR) to the LLVM Project. Since this is your first PR, here are a few useful links covering our main contribution policies and review practices.
-* All contributions to LLVM must follow our [LLVM AI Tool Use Policy](https://llvm.org/docs/AIToolPolicy.html). In particular, if you used AI while working on this PR, please add a note to the PR description.
-* The [LLVM Code-Review Policy and Practices](https://llvm.org/docs/CodeReview.html) document contains practical information about the PR process, including how patches are reviewed and accepted, and who can review a PR
+* All contributions to LLVM must follow our [LLVM AI Tool Use Policy](https://llvm.org/docs/AIToolPolicy.html). In particular, if you used AI while working on this PR, remember to add a note to the PR description.
+* The [LLVM Code-Review Policy and Practices](https://llvm.org/docs/CodeReview.html) document contains practical information about the PR process, including how patches are reviewed and accepted, and who can review a PR.
* Our [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html) describes our expectations for code quality and commit summaries, your GitHub settings (see e.g. [Email Addresses](https://llvm.org/docs/DeveloperPolicy.html#email-addresses)) and also includes notes on our CI system.
If you have questions, feel free to leave a comment on this PR, or ask on [LLVM Discord](https://discord.com/invite/xS7Z362) or [LLVM Discourse](https://discourse.llvm.org/).
>From b9e495d7f55e821378f9d4f5a55239a73abaf22f Mon Sep 17 00:00:00 2001
From: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: Wed, 6 May 2026 09:23:37 +0000
Subject: [PATCH 5/7] Add a request to reply to the greeter
---
llvm/utils/git/github-automation.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index b22b2bdaa12de..a758cb5e52484 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -266,6 +266,8 @@ def run(self) -> bool:
* The [LLVM Code-Review Policy and Practices](https://llvm.org/docs/CodeReview.html) document contains practical information about the PR process, including how patches are reviewed and accepted, and who can review a PR.
* Our [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html) describes our expectations for code quality and commit summaries, your GitHub settings (see e.g. [Email Addresses](https://llvm.org/docs/DeveloperPolicy.html#email-addresses)) and also includes notes on our CI system.
+Please reply to this message to confirm that you have read these policies, especially the LLVM AI Tool Use Policy, and that any AI tool usage has been noted in the PR description.
+
If you have questions, feel free to leave a comment on this PR, or ask on [LLVM Discord](https://discord.com/invite/xS7Z362) or [LLVM Discourse](https://discourse.llvm.org/).
Thank you,
>From ad29f6d3c026505bbb894b837b1822f32be42726 Mon Sep 17 00:00:00 2001
From: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: Thu, 7 May 2026 15:27:05 +0100
Subject: [PATCH 6/7] Add FAQ section
---
llvm/utils/git/github-automation.py | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index a758cb5e52484..0275758d96b5e 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -268,6 +268,26 @@ def run(self) -> bool:
Please reply to this message to confirm that you have read these policies, especially the LLVM AI Tool Use Policy, and that any AI tool usage has been noted in the PR description.
+---
+
+### Frequently asked questions
+
+**How do I add reviewers?**
+
+This PR will be automatically labeled, and the relevant teams will be notified. For some parts of the project, reviewers may also be added automatically.
+
+You can also add reviewers manually using the **Reviewers** section on this page. If you cannot use that section, it is probably because you do not have write permissions for the repository. In that case, you can request a review by tagging reviewers in a comment using `@` followed by their GitHub username.
+
+**What if there are no comments?**
+
+If you have not received any comments on your PR after a week, you can request a review by pinging the PR with a comment such as “Ping”. The common courtesy ping rate is once a week. Please remember that you are asking for volunteer time from other developers.
+
+**Are any special GitHub settings required to contribute to LLVM?**
+
+We only require contributors to have a public email address associated with their GitHub commits, see this [section](https://llvm.org/docs/DeveloperPolicy.html#email-addresses) of LLVM Developer Policy for details.
+
+---
+
If you have questions, feel free to leave a comment on this PR, or ask on [LLVM Discord](https://discord.com/invite/xS7Z362) or [LLVM Discourse](https://discourse.llvm.org/).
Thank you,
>From f6f2d2c0ccca21b618dce0fae006b0d9427ac7fa Mon Sep 17 00:00:00 2001
From: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: Fri, 8 May 2026 07:50:35 +0100
Subject: [PATCH 7/7] Remove duplicate note
---
llvm/utils/git/github-automation.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index 0275758d96b5e..e8b6d92a56ec6 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -264,7 +264,7 @@ def run(self) -> bool:
* All contributions to LLVM must follow our [LLVM AI Tool Use Policy](https://llvm.org/docs/AIToolPolicy.html). In particular, if you used AI while working on this PR, remember to add a note to the PR description.
* The [LLVM Code-Review Policy and Practices](https://llvm.org/docs/CodeReview.html) document contains practical information about the PR process, including how patches are reviewed and accepted, and who can review a PR.
-* Our [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html) describes our expectations for code quality and commit summaries, your GitHub settings (see e.g. [Email Addresses](https://llvm.org/docs/DeveloperPolicy.html#email-addresses)) and also includes notes on our CI system.
+* Our [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html) describes our expectations for code quality, commit summaries and contains notes on our CI system.
Please reply to this message to confirm that you have read these policies, especially the LLVM AI Tool Use Policy, and that any AI tool usage has been noted in the PR description.
More information about the llvm-commits
mailing list