File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -232,7 +232,11 @@ export async function coanaFix(
232232 return { ok : true , data : { fixed : false } }
233233 }
234234
235- debugFn ( 'notice' , `fetch: ${ ids . length } GHSA details for ${ joinAnd ( ids ) } ` )
235+ const displayIds =
236+ ids . length > 3
237+ ? `${ ids . slice ( 0 , 3 ) . join ( ', ' ) } ... and ${ ids . length - 3 } more`
238+ : joinAnd ( ids )
239+ debugFn ( 'notice' , `fetch: ${ ids . length } GHSA details for ${ displayIds } ` )
236240
237241 const ghsaDetails = await fetchGhsaDetails ( ids )
238242 const scanBaseNames = new Set ( scanFilepaths . map ( p => path . basename ( p ) ) )
Original file line number Diff line number Diff line change @@ -71,8 +71,12 @@ export async function convertIdsToGhsas(ids: string[]): Promise<string[]> {
7171 const conversionResult = await convertPurlToGhsas ( trimmedId )
7272 if ( conversionResult . ok && conversionResult . data . length ) {
7373 validGhsas . push ( ...conversionResult . data )
74+ const displayGhsas =
75+ conversionResult . data . length > 3
76+ ? `${ conversionResult . data . slice ( 0 , 3 ) . join ( ', ' ) } ... and ${ conversionResult . data . length - 3 } more`
77+ : joinAnd ( conversionResult . data )
7478 logger . info (
75- `Converted ${ trimmedId } to ${ conversionResult . data . length } GHSA(s): ${ joinAnd ( conversionResult . data ) } ` ,
79+ `Converted ${ trimmedId } to ${ conversionResult . data . length } GHSA(s): ${ displayGhsas } ` ,
7680 )
7781 } else {
7882 errors . push (
You can’t perform that action at this time.
0 commit comments