Skip to content

Commit b59a875

Browse files
committed
Update
[ghstack-poisoned]
1 parent f2fe651 commit b59a875

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/scripts/propose_ghstack_orig_pr.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ def extract_stack_from_body(pr_body: str) -> List[int]:
5252
"""
5353

5454
prs = []
55-
ghstack_begin = "Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):"
55+
ghstack_begin = (
56+
"Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):"
57+
)
5658
ghstack_begin_seen = False
5759
for line in pr_body.splitlines():
5860
if ghstack_begin in line:
@@ -100,9 +102,15 @@ def create_prs_for_orig_branch(pr_stack: List[int], repo: Repository):
100102
Merge bot PR base: https://github.com/pytorch/executorch/tree/{orig_branch_merge_base}
101103
Merge bot PR head: https://github.com/pytorch/executorch/tree/{orig_branch_merge_head}"""
102104

103-
existing_orig_pr = repo.get_pulls(head="pytorch:" + orig_branch_merge_head, base=orig_branch_merge_base, state="open")
105+
existing_orig_pr = repo.get_pulls(
106+
head="pytorch:" + orig_branch_merge_head,
107+
base=orig_branch_merge_base,
108+
state="open",
109+
)
104110
if existing_orig_pr.totalCount > 0:
105-
print(f"PR for {orig_branch_merge_head} already exists {existing_orig_pr[0]}")
111+
print(
112+
f"PR for {orig_branch_merge_head} already exists {existing_orig_pr[0]}"
113+
)
106114
# We don't need to create/edit because the head PR is merged and orig is finalized.
107115
else:
108116
repo.create_pull(

0 commit comments

Comments
 (0)