From 67fedf9df7058c9293b7c409c28d4da3018a4b59 Mon Sep 17 00:00:00 2001 From: Rafael Gonzaga Date: Tue, 2 Jan 2024 17:14:49 +0000 Subject: [PATCH] fix: handle when report severity is not set (#765) --- lib/prepare_security.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prepare_security.js b/lib/prepare_security.js index 68a7d942..304319ca 100644 --- a/lib/prepare_security.js +++ b/lib/prepare_security.js @@ -78,7 +78,7 @@ class SecurityReleaseIssue { let reportsContent = ''; for (const report of reports.data) { const { id, attributes: { title }, relationships: { severity } } = report; - const reportLevel = severity.data.attributes.rating; + const reportLevel = severity ? severity.data.attributes.rating : 'TBD'; cli.separator(); cli.info(`Report: ${id} - ${title} (${reportLevel})`); const include = await cli.prompt(