From 4c0290f5d57c1409db5a231bfda0a22acecfc73a Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Tue, 19 Nov 2024 15:17:20 -0300 Subject: [PATCH] fixup! fixup! test: add cveId tests --- commit-to-output.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/commit-to-output.js b/commit-to-output.js index d697ab8..dfc5f74 100644 --- a/commit-to-output.js +++ b/commit-to-output.js @@ -39,9 +39,9 @@ export const formatType = { function toStringPlaintext (data) { let s = '' + if (data.cveId) { - const pr = data.pr ? data.prUrl : '' - return ` * ${data.cveId} - ${data.summary.trim()} - ${pr}` + s += `(${data.cveId})` } s += (data.semver || []).length ? `(${data.semver.join(', ').toUpperCase()}) ` : '' @@ -98,11 +98,7 @@ function toStringMarkdown (data) { } function toStringMessageOnly (data) { - let cveData = '' - if (data.cveId) { - cveData = `${data.cveId} - ` - } - return ` * ${cveData}${data.summary.trim()}` + return ` * ${data.cveId ? '(' + data.cveId + ') ' : ''}${data.summary.trim()}` } export function commitToOutput (commit, format, ghId, commitUrl) {