From a0adef15f55c038946b771c9a351952a70a84c67 Mon Sep 17 00:00:00 2001 From: Maurizio Porrato Date: Wed, 21 Feb 2024 09:18:37 +0000 Subject: [PATCH] [ISV-4530] Fix static result comment rendering issue (#593) `operator-sdk bundle validate` can return multi-line error messages that break the rendering of the result table in the comment added by the bot to the PR. This patch just strips any line break from the error messages when building the markdown table. Signed-off-by: Maurizio Porrato --- .../templates/openshift/tasks/report-static-tests-results.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/operator-pipeline/templates/openshift/tasks/report-static-tests-results.yml b/ansible/roles/operator-pipeline/templates/openshift/tasks/report-static-tests-results.yml index e33a345cd..aef098130 100644 --- a/ansible/roles/operator-pipeline/templates/openshift/tasks/report-static-tests-results.yml +++ b/ansible/roles/operator-pipeline/templates/openshift/tasks/report-static-tests-results.yml @@ -58,7 +58,7 @@ spec: echo >>$MESSAGE_FILE echo '|Status|Check|Message|' >>$MESSAGE_FILE echo '|:----:|:----|:------|' >>$MESSAGE_FILE - jq -r '(.outputs//[])[]|"|\(.type)|\(.check)|\(.message)|"' \ + jq -r '(.outputs//[])[]|"|\(.type)|\(.check)|\(.message|gsub("\n";" "))|"' \ <$JSON_RESULTS_FILE >>$MESSAGE_FILE echo >>$MESSAGE_FILE # Replace status words with corresponding symbols