[llvm] workflows: Add a simple pull request subscription workflow (PR #64913)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 22:29:37 PDT 2023


================
@@ -65,6 +66,31 @@ def run(self) -> bool:
         return False
 
 
+class PRSubscriber:
+    @property
+    def team_name(self) -> str:
+        return self._team_name
+
+    def __init__(self, token: str, repo: str, pr_number: int, label_name : str):
+        self.repo = github.Github(token).get_repo(repo)
+        self.org = github.Github(token).get_organization(self.repo.organization.login)
+        self.pr = self.repo.get_issue(pr_number).as_pull_request()
+        self._team_name = "pr-subscribers-{}".format(label_name).lower()
----------------
tstellar wrote:

@MaskRay Yes, we are going to have to create new teams.  I think in this case what we will do is to make pr-subscribers-backend:X86 a parent team of pr-subscribers-x86, so when you mention  pr-subscribers-backend:X86, members of pr-subscribers-x86 will be mentioned too.

I have a python script mapping the current team names to the new names, so we should be able to fix this for every team.

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


More information about the llvm-commits mailing list