[llvm] [GitHub] Add Greeting comment to new PRs with useful information (PR #72249)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 06:50:32 PST 2023


================
@@ -211,6 +211,35 @@ 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.
+
+        # This text is using Markdown formatting.
+        comment = f"""\
----------------
DavidSpickett wrote:

Sounds like folks would like it limited, and starting with only new contributors can't do any harm anyway, so I'll implement that.

https://github.com/llvm/llvm-project/pull/72249


More information about the llvm-commits mailing list