Skip to content

Commit

Permalink
Display task container names
Browse files Browse the repository at this point in the history
  • Loading branch information
kathy-t committed Dec 5, 2024
1 parent 3579a59 commit 1625cb8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 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,8 @@ 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?.map((container) => container.name).join(', ');

Check failure on line 261 in cloud-watch-to-slack-testing/deployment/index.js

View workflow job for this annotation

GitHub Actions / linterWithESLint

Replace `?.map((container)·=>·container.name).join(',·'` with `⏎····?.map((container)·=>·container.name)⏎····.join(",·"`
messageText += `\nTask containers: ${taskContainers}`;
["startedAt", "stoppedAt", "stoppedReason"].forEach((name) => {
const value = message?.detail?.[name];
if (value != undefined) {
Expand Down

0 comments on commit 1625cb8

Please sign in to comment.