ci: Include edition in failure messages to Slack (#33553)

This commit is contained in:
Shrikant Sharat Kandula 2024-05-18 00:14:20 +05:30 committed by GitHub
parent 8441311275
commit 16cd15a103
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -439,15 +439,7 @@ jobs:
set -o xtrace
run_url='${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}'
common_parent_sha='${{ steps.merge.outputs.common_parent_sha }}'
common_parent_sha_short="$(echo "$common_parent_sha" | grep -o '^.\{8\}' || true)"
merged_upto_sha='${{ steps.merge.outputs.merged_upto_sha }}'
merged_upto_sha_short="$(echo "$merged_upto_sha" | grep -o '^.\{8\}' || true)"
details="🚨 TBP workflow failed in <$run_url|${{ github.run_id }}/attempts/${{ github.run_attempt }}>."
# This unwieldy horror of a sed command, converts standard Markdown links to Slack's unwieldy link syntax.
slack_message=$(echo "$details" | sed -E 's/\[([^]]+)\]\(([^)]+)\)/<\2|\1>/g')
slack_message="🚨 TBP workflow failed in <$run_url|${{ vars.EDITION }} attempt ${{ github.run_attempt }} (run ${{ github.run_id }})>."
# This is the ChannelId of the tech channel.
body="$(jq -nc \