From 195e9f7be295287960816998daac15b486029cfd Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 22 Apr 2026 13:43:26 -0400 Subject: [PATCH] script/redmine-upkeep: resolve comment misformatting See for example [1]. [1] https://github.com/ceph/ceph/pull/67343#issuecomment-4298533030 Signed-off-by: Patrick Donnelly --- src/script/redmine-upkeep.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/script/redmine-upkeep.py b/src/script/redmine-upkeep.py index ccf5acbd2781..da671fb404ac 100755 --- a/src/script/redmine-upkeep.py +++ b/src/script/redmine-upkeep.py @@ -1342,7 +1342,7 @@ h2. Update Payload log.info(f"Found 'Fixes:' tags for tracker(s) #{', '.join([str(x) for x in found_tracker_ids])} in commits.") tracker_links = "\n".join([f"* https://tracker.ceph.com/issues/{tid}" for tid in found_tracker_ids]) - comment_body = f""" + comment_body = textwrap.dedent(""" This is an automated message by src/script/redmine-upkeep.py. I found one or more `Fixes:` tags in the commit messages in @@ -1354,13 +1354,12 @@ h2. Update Payload {tracker_links} Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them. - """ + """).format(revrange=revrange, tracker_links=tracker_links) if GITHUB_ACTIONS: - comment_body += f""" + comment_body += textwrap.dedent(f""" Update Log: {GITHUB_ACTION_LOG} - """ - comment_body = textwrap.dedent(comment_body) + """) log.debug(f"Leaving comment:\n{comment_body}") post_github_comment(self.session, pr_id, comment_body) -- 2.47.3