fix: streamline PR title cleaning process for comment publishing

This commit is contained in:
Abhinav Kumar
2025-07-10 17:19:52 +05:30
parent 9becad2eaf
commit 00b5815785

View File

@ -168,8 +168,8 @@ class PRDescription:
get_logger().debug(f"Labels are the same, not updating")
# publish description
pr_title_clean = pr_title.strip().replace('\n', ' ')
if get_settings().pr_description.publish_description_as_comment:
pr_title_clean = pr_title.strip().replace('\n', ' ')
full_markdown_description = f"## Title\n\n{pr_title_clean}\n\n___\n{pr_body}"
if get_settings().pr_description.publish_description_as_comment_persistent:
self.git_provider.publish_persistent_comment(full_markdown_description,
@ -180,7 +180,6 @@ class PRDescription:
else:
self.git_provider.publish_comment(full_markdown_description)
else:
pr_title_clean = pr_title.strip().replace('\n', ' ')
self.git_provider.publish_description(pr_title_clean, pr_body)
# publish final update message