Skip to content

Commit aca8da1

Browse files
committed
ghstack bot skip if a corresponding PR is merged
If a corresponding fixup PR is merged, the bot should not attempt to create a duplicated one ghstack-source-id: 99e176c Pull Request resolved: #6426
1 parent ca47839 commit aca8da1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/scripts/propose_ghstack_orig_pr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ def create_prs_for_orig_branch(pr_stack: List[int], repo: Repository):
112112
existing_orig_pr = repo.get_pulls(
113113
head="pytorch:" + orig_branch_merge_head,
114114
base=orig_branch_merge_base,
115-
state="open",
115+
state="all",
116116
)
117-
if existing_orig_pr.totalCount > 0:
117+
if existing_orig_pr.totalCount > 0 and existing_orig_pr[0].title == pr.title:
118118
print(
119119
f"PR for {orig_branch_merge_head} already exists {existing_orig_pr[0]}"
120120
)

0 commit comments

Comments
 (0)