From f58482226650af634e4d3be97cadf05a83447604 Mon Sep 17 00:00:00 2001 From: Oriol Arbusi Date: Thu, 21 Mar 2024 17:23:44 +0100 Subject: [PATCH] formating --- .../generate-slack-notification-content.sh | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/scripts/generate-slack-notification-content.sh b/scripts/generate-slack-notification-content.sh index 33c2b05d64..8c1937fc32 100755 --- a/scripts/generate-slack-notification-content.sh +++ b/scripts/generate-slack-notification-content.sh @@ -31,47 +31,47 @@ if [ "$1" == "success" ]; then text_value="HashiCorp Terraform Compatibility Matrix succeeded!" json="{ - \"text\": \"$text_value\", - \"blocks\": [ - { - \"type\": \"section\", - \"text\": { - \"type\": \"mrkdwn\", - \"text\": \"$text_value\" - } + \"text\": \"$text_value\", + \"blocks\": [ + { + \"type\": \"section\", + \"text\": { + \"type\": \"mrkdwn\", + \"text\": \"$text_value\" } - ] - }" + } + ] +}" else text_value="HashiCorp Terraform Compatibility Matrix failed!" server_url=$2 repository=$3 run_id=$4 json="{ - \"text\": \"$text_value\", - \"blocks\": [ +\"text\": \"$text_value\", +\"blocks\": [ + { + \"type\": \"section\", + \"text\": { + \"type\": \"mrkdwn\", + \"text\": \"$text_value\" + } + }, + { + \"type\": \"actions\", + \"elements\": [ { - \"type\": \"section\", + \"type\": \"button\", \"text\": { - \"type\": \"mrkdwn\", - \"text\": \"$text_value\" - } - }, - { - \"type\": \"actions\", - \"elements\": [ - { - \"type\": \"button\", - \"text\": { - \"type\": \"plain_text\", - \"text\": \":github: Failed action\" - }, - \"url\": \"${server_url}/${repository}/actions/runs/${run_id}\" - }, - ] + \"type\": \"plain_text\", + \"text\": \":github: Failed action\" + }, + \"url\": \"${server_url}/${repository}/actions/runs/${run_id}\" } ] - }" + } +] +}" fi -echo "$json" +echo $json