Skip to content

Commit d04905a

Browse files
authored
ghstack bot skip if a corresponding PR is merged (#6426)
Update [ghstack-poisoned]
1 parent c9b38a5 commit d04905a

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)