Skip to content

Commit

Permalink
ghstack bot skip if a corresponding PR is merged (pytorch#6427)
Browse files Browse the repository at this point in the history
If a corresponding fixup PR is merged, the bot should not attempt to create a duplicated one

ghstack-source-id: 99e176c59cefda7ab8a811f1033a5a617d69be1f
Pull Request resolved: pytorch#6426

Co-authored-by: Hansong Zhang <[email protected]>
  • Loading branch information
pytorchbot and kirklandsign authored Oct 22, 2024
1 parent 979708d commit 0aa802d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/propose_ghstack_orig_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def create_prs_for_orig_branch(pr_stack: List[int], repo: Repository):
existing_orig_pr = repo.get_pulls(
head="pytorch:" + orig_branch_merge_head,
base=orig_branch_merge_base,
state="open",
state="all",
)
if existing_orig_pr.totalCount > 0:
if existing_orig_pr.totalCount > 0 and existing_orig_pr[0].title == pr.title:
print(
f"PR for {orig_branch_merge_head} already exists {existing_orig_pr[0]}"
)
Expand Down

0 comments on commit 0aa802d

Please sign in to comment.