zed: prettify slack notification message

This converts the body of a ZED slack notification from
plain text to code block style to help with readability.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: René Wirnata <rene.wirnata@pandascience.net>
Closes #17610
This commit is contained in:
René Wirnata 2025-08-11 18:44:51 +02:00 committed by Brian Behlendorf
parent a49c957299
commit 9651668457

View File

@ -441,8 +441,9 @@ zed_notify_slack_webhook()
"${pathname}")" "${pathname}")"
# Construct the JSON message for posting. # Construct the JSON message for posting.
# shellcheck disable=SC2016
# #
msg_json="$(printf '{"text": "*%s*\\n%s"}' "${subject}" "${msg_body}" )" msg_json="$(printf '{"text": "*%s*\\n```%s```"}' "${subject}" "${msg_body}" )"
# Send the POST request and check for errors. # Send the POST request and check for errors.
# #