Skip to content

Commit

Permalink
Include stack set operation action
Browse files Browse the repository at this point in the history
  • Loading branch information
farski committed Apr 22, 2024
1 parent e82e2f2 commit f803d0a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/status-change-slack-notifications/stack-set-change.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export default function message(event) {
const stackSetID = stackSetArn.split("stackset/")[1];
const stackSetName = stackSetID.split(":")[0];

const { action } = event.detail;

const { status } = event.detail["status-details"];

const { region } = event;
Expand All @@ -29,10 +31,10 @@ export default function message(event) {
const accountNickname = accounts(event.account);
const header = [
`*<${deepStackUrl}|${accountNickname} - ${regionNickname} » ${stackSetName}>*`,
`Stack Set Status Change: *${status}*`,
`Stack Set Status Change: ${action} *${status}*`,
].join("\n");

const fallback = `${accountNickname} - ${regionNickname} » Stack Set ${stackSetName} is now ${status}`;
const fallback = `${accountNickname} - ${regionNickname} » Stack Set ${stackSetName} is now ${action} ${status}`;

const msg = {
username: SLACK_USERNAME,
Expand Down

0 comments on commit f803d0a

Please sign in to comment.