Skip to content

Commit

Permalink
formating
Browse files Browse the repository at this point in the history
  • Loading branch information
oarbusi committed Mar 21, 2024
1 parent f05b9a4 commit f584822
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions scripts/generate-slack-notification-content.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f584822

Please sign in to comment.