Skip to content

Commit

Permalink
Fix pull request filtering (ss220club#1711)
Browse files Browse the repository at this point in the history
## Что этот PR делает
Чинит проверку на существующий ПР мерге апстрима.
  • Loading branch information
m-dzianishchyts authored Dec 25, 2024
1 parent 1a8b92c commit d1a884e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/merge-upstream/merge_upstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,10 @@ def create_pr(repo: Repository, details: PullDetails):
def check_pull_exists(target_repo: Repository, base: str, head: str):
"""Check if the merge pull request already exist. In this case, fail the action."""
print("Checking on existing pull request...")
existing_pulls: PaginatedList[PullRequest] = target_repo.get_pulls(state="open", base=base, head=head)
owner: str = target_repo.owner.login
base_strict = f"{owner}:{base}"
head_strict = f"{owner}:{head}"
existing_pulls: PaginatedList[PullRequest] = target_repo.get_pulls(state="open", base=base_strict, head=head_strict)
for pull in existing_pulls:
print(f"Pull request already exists. {pull.html_url}")

Expand Down

0 comments on commit d1a884e

Please sign in to comment.