From 60b1c0c5200f6134f00f400a5a5a1acc35dc3c8c Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Wed, 9 Aug 2023 20:12:15 +0200 Subject: [PATCH] Fix log messages --- scripts/src/scverse_template_scripts/cruft_prs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/src/scverse_template_scripts/cruft_prs.py b/scripts/src/scverse_template_scripts/cruft_prs.py index 1feb998c..62755e47 100644 --- a/scripts/src/scverse_template_scripts/cruft_prs.py +++ b/scripts/src/scverse_template_scripts/cruft_prs.py @@ -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: @@ -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)