Skip to content

Commit

Permalink
Merge branch 'hotfix/0.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
kathy-t committed Dec 16, 2024
2 parents 1a1719e + 4b661e5 commit 85c07e8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cloud-watch-to-slack-testing/deployment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@ function ecsTaskStateChangeMessageText(message) {
const taskArn = message?.detail?.taskArn;
const lastStatus = message?.detail?.lastStatus;
let messageText = `Task ${taskArn} is now ${lastStatus}`;
const taskContainers = message?.detail?.containers;
if (Array.isArray(taskContainers)) {
const taskContainerNames = taskContainers
?.map((container) => container.name)
?.join(", ");
messageText += `\nContainers: ${taskContainerNames}`;
}
["startedAt", "stoppedAt", "stoppedReason"].forEach((name) => {
const value = message?.detail?.[name];
if (value != undefined) {
Expand Down

0 comments on commit 85c07e8

Please sign in to comment.