updated summary output; create_summary.ts script

This commit is contained in:
Stefan Petrushevski
2023-03-08 13:02:59 +01:00
parent 600458c5dd
commit 884b7abd2d
2 changed files with 9 additions and 4 deletions
+4
View File
@@ -22,6 +22,10 @@ const defaultConfig: ConfigurationOptions = {
allow_ghsas: [],
allow_licenses: ['MIT'],
deny_licenses: [],
allow_dependencies_licenses: {
npm: ['pkg1'],
pip: ['pkg2']
},
comment_summary_in_pr: true
}
+5 -4
View File
@@ -144,13 +144,14 @@ export function addLicensesToSummary(
)
}
if (config.allow_dependencies_licenses) {
core.summary.addRaw(
"<strong>Allow Dependencies (Exceptions)' Licenses</strong>: true"
)
core.summary.addHeading('Allowed licensing exceptions', 3)
for (const [ecosystem, dependencies] of Object.entries(
config.allow_dependencies_licenses
)) {
core.summary.addRaw(`- ${ecosystem}</strong>: ${dependencies.join(', ')}`)
core.summary.addRaw(
`<li> ${ecosystem}</strong>: ${dependencies.join(', ')} </li>`
)
}
}