Skip to content

Commit d1a884e

Browse files
Fix pull request filtering (#1711)
## Что этот PR делает Чинит проверку на существующий ПР мерге апстрима.
1 parent 1a8b92c commit d1a884e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/merge-upstream/merge_upstream.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,10 @@ def create_pr(repo: Repository, details: PullDetails):
348348
def check_pull_exists(target_repo: Repository, base: str, head: str):
349349
"""Check if the merge pull request already exist. In this case, fail the action."""
350350
print("Checking on existing pull request...")
351-
existing_pulls: PaginatedList[PullRequest] = target_repo.get_pulls(state="open", base=base, head=head)
351+
owner: str = target_repo.owner.login
352+
base_strict = f"{owner}:{base}"
353+
head_strict = f"{owner}:{head}"
354+
existing_pulls: PaginatedList[PullRequest] = target_repo.get_pulls(state="open", base=base_strict, head=head_strict)
352355
for pull in existing_pulls:
353356
print(f"Pull request already exists. {pull.html_url}")
354357

0 commit comments

Comments
 (0)