Adjusted output

This commit is contained in:
Stefan Petrushevski
2023-04-06 10:04:48 +02:00
parent d3fdbc93c5
commit 39dca1ce09
4 changed files with 8 additions and 51 deletions
+1 -10
View File
@@ -30,10 +30,6 @@ export async function getInvalidLicenseChanges(
}
): Promise<InvalidLicenseChanges> {
const {allow, deny} = licenses
// licenseExclusions = licenseExclusions.map((pkgUrl: string) => {
// return PackageURL.fromString(pkgUrl)
// })
const licenseExclusions = licenses.licenseExclusions?.map(
(pkgUrl: string) => {
return PackageURL.fromString(pkgUrl)
@@ -41,9 +37,7 @@ export async function getInvalidLicenseChanges(
)
const groupedChanges = await groupChanges(changes)
core.info(
`Grouped changes BEFORE filter size: ${groupedChanges.licensed.length}`
)
// filter out changes that are part of exclusions list - config.allow_dependencies_licenses
groupedChanges.licensed = groupedChanges.licensed.filter(change => {
const changeAsPackageURL = new PackageURL(
@@ -66,9 +60,6 @@ export async function getInvalidLicenseChanges(
}
return true
})
core.info(
`Grouped changes after filter size: ${groupedChanges.licensed.length}`
)
const licensedChanges: Changes = groupedChanges.licensed
const invalidLicenseChanges: InvalidLicenseChanges = {
+5 -7
View File
@@ -144,13 +144,11 @@ export function addLicensesToSummary(
)
}
if (config.allow_dependencies_licenses) {
core.summary.addHeading('Allowed licensing exceptions', 3)
for (const [ecosystem, dependencies] of Object.entries(
config.allow_dependencies_licenses
)) {
core.summary.addRaw(`<li> ${ecosystem}</strong>: ${dependencies} </li>`)
}
core.summary.addQuote(
`<strong>Excluded from license check</strong>: ${config.allow_dependencies_licenses.join(
', '
)}`
)
}
core.debug(