From 784c9b9cb2bdeab6a796b4a3e55404c6426e5048 Mon Sep 17 00:00:00 2001
From: Neves-P
Date: Tue, 11 Jun 2024 16:56:25 +0200
Subject: [PATCH] Better formatting for merge conflict errors
---
tasks/build.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tasks/build.py b/tasks/build.py
index 82a0911e..527758d7 100644
--- a/tasks/build.py
+++ b/tasks/build.py
@@ -381,21 +381,21 @@ def comment_download_pr(base_repo_name, pr, download_pr_exit_code, download_pr_e
download_pr_comments_cfg = config.read_config()[config.SECTION_DOWNLOAD_PR_COMMENTS]
if error_stage == _ERROR_GIT_CLONE:
- download_comment = (f"`{download_pr_error}`"
+ download_comment = (f"`{download_pr_error}`\n"
f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_CLONE_FAILURE]}"
- f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_CLONE_TIP]}")
+ f"\n{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_CLONE_TIP]}")
elif error_stage == _ERROR_GIT_CHECKOUT:
- download_comment = (f"`{download_pr_error}`"
+ download_comment = (f"`{download_pr_error}`\n"
f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_CHECKOUT_FAILURE]}"
- f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_CHECKOUT_TIP]}")
+ f"\n{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_CHECKOUT_TIP]}")
elif error_stage == _ERROR_CURL:
- download_comment = (f"`{download_pr_error}`"
+ download_comment = (f"`{download_pr_error}`\n"
f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_CURL_FAILURE]}"
- f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_CURL_TIP]}")
+ f"\n{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_CURL_TIP]}")
elif error_stage == _ERROR_GIT_APPLY:
- download_comment = (f"`{download_pr_error}`"
+ download_comment = (f"`{download_pr_error}`\n"
f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_APPLY_FAILURE]}"
- f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_APPLY_TIP]}")
+ f"\n{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_APPLY_TIP]}")
download_comment = pr_comments.create_comment(
repo_name=base_repo_name, pr_number=pr.number, comment=download_comment