Skip to content

Commit 60b1c0c

Browse files
committed
Fix log messages
1 parent fccd4c3 commit 60b1c0c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/src/scverse_template_scripts/cruft_prs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ def make_pr(con: GitHubConnection, release: GHRelease, repo_url: str) -> None:
224224
repo = get_fork(con, origin)
225225

226226
if old_pr := next((p for p in origin.get_pulls("open") if pr.matches_current_version(p)), None):
227-
log.info(f"PR for current version already exists: #{pr.number} with branch name `{pr.head.ref}`. Skipping.")
227+
log.info(
228+
f"PR for current version already exists: #{old_pr.number} with branch name `{old_pr.head.ref}`. Skipping."
229+
)
228230
return
229231

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

0 commit comments

Comments
 (0)