[llvm] [GitHub] Add Greeting comment to new contributor's PRs with useful information (PR #72249)
Julian Schmidt via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 08:31:50 PST 2023
================
@@ -211,6 +211,36 @@ def _get_curent_team(self) -> Optional[github.Team.Team]:
return None
+class PRGreeter:
+ def __init__(self, token: str, repo: str, pr_number: int):
+ repo = github.Github(token).get_repo(repo)
+ self.pr = repo.get_issue(pr_number).as_pull_request()
+
+ def run(self) -> bool:
+ # We assume that this is only called for a PR that has just been opened
+ # by a user new to LLVM and/or GitHub itself.
+
+ # This text is using Markdown formatting.
+ comment = f"""\
+Thank you for submitting a Pull Request (PR) to the LLVM Project!
+
+You can add reviewers by using the "Reviewers" section on this page.
----------------
5chmidti wrote:
What about a sentence before this that explains that prs are automatically labeled and the respective teams for these labels will automatically be pinged. I would still keep the rest of the reviewer part, because the user might want to ping specific people for their involvement in that part of the code-base.
https://github.com/llvm/llvm-project/pull/72249
More information about the llvm-commits
mailing list