[llvm] workflows: Add some automation for commit access requests (PR #123113)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 23:21:08 PST 2025


================
@@ -241,6 +249,57 @@ def run(self) -> bool:
         return True
 
 
+class CommitRequestGreeter:
+    def __init__(self, token: str, repo: str, issue_number: int):
+        self.repo = github.Github(token).get_repo(repo)
+        self.issue = self.repo.get_issue(issue_number)
+
+    def run(self) -> bool:
+        # Post greeter comment:
+        comment = f"""
+@{self.issue.user.login} thank you for apply for commit access.  Please  review the project's [code review policy](https://llvm.org/docs/CodeReview.html).
----------------
boomanaiden154 wrote:

Maybe `textwrap.dedent` here instead of getting rid of all the space in the beginning to preserve the indentation?

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


More information about the llvm-commits mailing list