updated summary output; create_summary.ts script
This commit is contained in:
@@ -22,6 +22,10 @@ const defaultConfig: ConfigurationOptions = {
|
|||||||
allow_ghsas: [],
|
allow_ghsas: [],
|
||||||
allow_licenses: ['MIT'],
|
allow_licenses: ['MIT'],
|
||||||
deny_licenses: [],
|
deny_licenses: [],
|
||||||
|
allow_dependencies_licenses: {
|
||||||
|
npm: ['pkg1'],
|
||||||
|
pip: ['pkg2']
|
||||||
|
},
|
||||||
comment_summary_in_pr: true
|
comment_summary_in_pr: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -144,13 +144,14 @@ export function addLicensesToSummary(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (config.allow_dependencies_licenses) {
|
if (config.allow_dependencies_licenses) {
|
||||||
core.summary.addRaw(
|
core.summary.addHeading('Allowed licensing exceptions', 3)
|
||||||
"<strong>Allow Dependencies (Exceptions)' Licenses</strong>: true"
|
|
||||||
)
|
|
||||||
for (const [ecosystem, dependencies] of Object.entries(
|
for (const [ecosystem, dependencies] of Object.entries(
|
||||||
config.allow_dependencies_licenses
|
config.allow_dependencies_licenses
|
||||||
)) {
|
)) {
|
||||||
core.summary.addRaw(`- ${ecosystem}</strong>: ${dependencies.join(', ')}`)
|
core.summary.addRaw(
|
||||||
|
`<li> ${ecosystem}</strong>: ${dependencies.join(', ')} </li>`
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user