Adjusted output
This commit is contained in:
+1
-10
@@ -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
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user