mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-14 09:40:39 +08:00
fix: streamline PR title cleaning process for comment publishing
This commit is contained in:
@ -168,8 +168,8 @@ class PRDescription:
|
|||||||
get_logger().debug(f"Labels are the same, not updating")
|
get_logger().debug(f"Labels are the same, not updating")
|
||||||
|
|
||||||
# publish description
|
# publish description
|
||||||
|
pr_title_clean = pr_title.strip().replace('\n', ' ')
|
||||||
if get_settings().pr_description.publish_description_as_comment:
|
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}"
|
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:
|
if get_settings().pr_description.publish_description_as_comment_persistent:
|
||||||
self.git_provider.publish_persistent_comment(full_markdown_description,
|
self.git_provider.publish_persistent_comment(full_markdown_description,
|
||||||
@ -180,7 +180,6 @@ class PRDescription:
|
|||||||
else:
|
else:
|
||||||
self.git_provider.publish_comment(full_markdown_description)
|
self.git_provider.publish_comment(full_markdown_description)
|
||||||
else:
|
else:
|
||||||
pr_title_clean = pr_title.strip().replace('\n', ' ')
|
|
||||||
self.git_provider.publish_description(pr_title_clean, pr_body)
|
self.git_provider.publish_description(pr_title_clean, pr_body)
|
||||||
|
|
||||||
# publish final update message
|
# publish final update message
|
||||||
|
Reference in New Issue
Block a user