Skip to content

Commit

Permalink
Fix log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Aug 9, 2023
1 parent fccd4c3 commit 60b1c0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/src/scverse_template_scripts/cruft_prs.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ def make_pr(con: GitHubConnection, release: GHRelease, repo_url: str) -> None:
repo = get_fork(con, origin)

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: #{pr.number} with branch name `{pr.head.ref}`. Skipping.")
log.info(
f"PR for current version already exists: #{old_pr.number} with branch name `{old_pr.head.ref}`. Skipping."
)
return

with TemporaryDirectory() as td:
Expand All @@ -238,7 +240,7 @@ def make_pr(con: GitHubConnection, release: GHRelease, repo_url: str) -> None:
)
if updated:
if old_pr := next((p for p in origin.get_pulls("open") if pr.matches_prefix(p)), None):
log.info(f"Closing old PR #{old_pr.number} with branch name `{pr.head.ref}`.")
log.info(f"Closing old PR #{old_pr.number} with branch name `{old_pr.head.ref}`.")
old_pr.edit(state="closed")
origin.create_pull(pr.title, pr.body, origin.default_branch, pr.namespaced_head)

Expand Down

0 comments on commit 60b1c0c

Please sign in to comment.