Skip to content

Commit

Permalink
Ensure each Issue is pushed on its own line, not an array
Browse files Browse the repository at this point in the history
  • Loading branch information
stevemac007 committed Jun 13, 2024
1 parent 66f7c14 commit 8d75d1e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions src/parsers/guardduty-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,15 @@ exports.parse = event => {
value: clusterName,
short: true
});
fields.push({
title: "Issue",
value: issues,
short: false
});

for (const issue of issues) {
fields.push({
title: "Issue",
value: issue,
short: false
});
}

fields.push({
title: "Management Type",
value: managementType,
Expand Down
2 changes: 1 addition & 1 deletion test/parsers/guardduty-runtime.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ runtimeMock.matchesEventWithDetail(unhealthyECSEvent, {
{
"short": false,
"title": "Issue",
"value": [ "Others : Unidentified issue(s), for task(s) in TaskDefinition 'buildkite:17' . Refer documentation",],
"value": "Others : Unidentified issue(s), for task(s) in TaskDefinition 'buildkite:17' . Refer documentation",
},
{
"short": true,
Expand Down

0 comments on commit 8d75d1e

Please sign in to comment.