diff --git a/src/licenses.ts b/src/licenses.ts index 8f57531..7b01342 100644 --- a/src/licenses.ts +++ b/src/licenses.ts @@ -1,4 +1,4 @@ -import {Change, ChangeSchema} from './schemas' +import {Change} from './schemas' /** * Loops through a list of changes, filtering and returning the diff --git a/src/main.ts b/src/main.ts index fde9707..7d1ac89 100644 --- a/src/main.ts +++ b/src/main.ts @@ -58,7 +58,7 @@ async function run(): Promise { ) if (licenseErrors.length > 0) { - printLicensesError(licenseErrors, licenses) + printLicensesError(licenseErrors) core.setFailed('Dependency review detected incompatible licenses.') } @@ -90,7 +90,7 @@ async function run(): Promise { } } -function printChangeVulnerabilities(change: Change) { +function printChangeVulnerabilities(change: Change): void { for (const vuln of change.vulnerabilities) { core.info( `${styles.bold.open}${change.manifest} ยป ${change.name}@${ @@ -117,19 +117,11 @@ function renderSeverity( return `${styles.color[color].open}(${severity} severity)${styles.color[color].close}` } -function printLicensesError( - changes: Change[], - licenses: { - allow?: string[] - deny?: string[] - } -): void { - if (changes.length == 0) { +function printLicensesError(changes: Change[]): void { + if (changes.length === 0) { return } - const {allow = [], deny = []} = licenses - core.info('\nThe following dependencies have incompatible licenses:\n') for (const change of changes) { core.info(