Skip to content

Commit

Permalink
Include status reason when available
Browse files Browse the repository at this point in the history
  • Loading branch information
farski committed Sep 23, 2024
1 parent cde6af4 commit 0fc743d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/status-change-slack-notifications/stack-status-change.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ export default function message(event) {
// Send end-stage and concerning notifications to DEBUG
if (concerning.includes(status) || status.endsWith("_COMPLETE")) {
msg.channel = SLACK_DEBUG_CHANNEL;

if (statusReason) {
msg.attachments[0].blocks.push({
type: "section",
text: {
type: "mrkdwn",
text: `> ${statusReason}`,
},
});
}
return msg;
}

Expand Down

0 comments on commit 0fc743d

Please sign in to comment.