Skip to content

Commit

Permalink
[ISV-4530] Fix static result comment rendering issue (#593)
Browse files Browse the repository at this point in the history
`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 <[email protected]>
  • Loading branch information
mporrato authored Feb 21, 2024
1 parent 525e02d commit a0adef1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a0adef1

Please sign in to comment.