Skip to content

Commit

Permalink
Don't show desciption if there is none in alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Dec 7, 2024
1 parent de5f846 commit e18623a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/shadow/arborist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,12 @@ async function packagesHaveRiskyIssues(
if (type) {
// Based data from { pageProps: { alertTypes } } of:
// https://socket.dev/_next/data/94666139314b6437ee4491a0864e72b264547585/en-US.json
const issueTypeTranslation = translations.issues[type]
const info = translations.issues[type]
const title = info?.title ?? type
const maybeBlocking = failure.block ? '' : ' (non-blocking)'
const maybeDesc = info?.description ? ` - ${info.description}` : ''
// TODO: emoji seems to mis-align terminals sometimes
lines.add(
` ${issueTypeTranslation?.title ?? type}${failure.block ? '' : ' (non-blocking)'} - ${issueTypeTranslation?.description ?? ''}\n`
)
lines.add(` ${title}${maybeBlocking}${maybeDesc}\n`)
}
}
for (const line of lines) {
Expand Down

0 comments on commit e18623a

Please sign in to comment.