Skip to content

Commit

Permalink
Fix logging for existing PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Aug 16, 2023
1 parent abf05fc commit 605f957
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/src/scverse_template_scripts/cruft_prs.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def make_pr(con: GitHubConnection, release: GHRelease, repo_url: str) -> None:
origin = con.gh.get_repo(repo_url.removeprefix("https://github.com/"))
repo = get_fork(con, origin)

if any(True for p in origin.get_pulls("open") if pr.matches_current_version(p)):
if old_pr := next((p for p in origin.get_pulls("open") if pr.matches_current_version(p)), None):
log.info(
f"PR for current version already exists: #{old_pr.number} with branch name `{old_pr.head.ref}`. Skipping."
)
Expand Down

0 comments on commit 605f957

Please sign in to comment.