[llvm] github-automation: Use the llvm/llvm-project repo for backport pull requests (PR #71727)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 11:22:10 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r 64d413efdd76f2e6464ae6f578161811b9d12411..a2d6420fc435dd410fa0ef2badd7f99a1c09c157 llvm/utils/git/github-automation.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- github-automation.py	2023-11-08 19:16:29.000000 +0000
+++ github-automation.py	2023-11-08 19:22:02.865253 +0000
@@ -468,11 +468,11 @@
             self.issue.remove_from_labels(self.CHERRY_PICK_FAILED_LABEL)
 
     def get_main_commit(self, cherry_pick_sha: str) -> github.Commit.Commit:
         commit = self.repo.get_commit(cherry_pick_sha)
         message = commit.commit.message
-        m = re.search('\(cherry picked from commit ([0-9a-f]+)\)', message)
+        m = re.search("\(cherry picked from commit ([0-9a-f]+)\)", message)
         if not m:
             return None
         return self.repo.get_commit(m.group(1))
 
     def pr_request_review(self, pr: github.PullRequest.PullRequest):
@@ -489,11 +489,11 @@
             main_commit = self.get_main_commit(commit.sha)
             if not main_commit:
                 continue
             for pull in main_commit.get_pulls():
                 for review in pull.get_reviews():
-                    if review.state != 'APPROVED':
+                    if review.state != "APPROVED":
                         continue
                 reviewers.append(review.user.login)
         if len(reviewers):
             message = "{} What do you think about merging this PR to the release branch?".format(
                 " ".join(["@" + r for r in reviewers])
@@ -591,11 +591,11 @@
                 base=release_branch_for_issue,
                 head=head,
                 maintainer_can_modify=False,
             )
 
-            pull.as_issue().edit(milestone = self.issue.milestone)
+            pull.as_issue().edit(milestone=self.issue.milestone)
 
             try:
                 self.pr_request_review(pull)
             except Exception as e:
                 print("error: Failed while searching for reviewers", e)

``````````

</details>


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


More information about the llvm-commits mailing list