From: Patrick Donnelly Date: Wed, 22 Apr 2026 17:43:26 +0000 (-0400) Subject: script/redmine-upkeep: resolve comment misformatting X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F68555%2Fhead;p=ceph.git 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 --- 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)