+1
-2
@@ -86,7 +86,6 @@ function getDeniedLicenseChanges(changes, licenses) {
|
|||||||
let unknown = [];
|
let unknown = [];
|
||||||
for (const change of changes) {
|
for (const change of changes) {
|
||||||
let license = change.license;
|
let license = change.license;
|
||||||
// TODO: be loud about unknown licenses
|
|
||||||
if (license === null) {
|
if (license === null) {
|
||||||
unknown.push(change);
|
unknown.push(change);
|
||||||
continue;
|
continue;
|
||||||
@@ -191,9 +190,9 @@ function run() {
|
|||||||
let [licenseErrors, unknownLicenses] = (0, licenses_1.getDeniedLicenseChanges)(changes, licenses);
|
let [licenseErrors, unknownLicenses] = (0, licenses_1.getDeniedLicenseChanges)(changes, licenses);
|
||||||
if (licenseErrors.length > 0) {
|
if (licenseErrors.length > 0) {
|
||||||
printLicensesError(licenseErrors, licenses);
|
printLicensesError(licenseErrors, licenses);
|
||||||
printNullLicenses(unknownLicenses);
|
|
||||||
core.setFailed('Dependency review detected incompatible licenses.');
|
core.setFailed('Dependency review detected incompatible licenses.');
|
||||||
}
|
}
|
||||||
|
printNullLicenses(unknownLicenses);
|
||||||
if (failed) {
|
if (failed) {
|
||||||
core.setFailed('Dependency review detected vulnerable packages.');
|
core.setFailed('Dependency review detected vulnerable packages.');
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -26,7 +26,6 @@ export function getDeniedLicenseChanges(
|
|||||||
|
|
||||||
for (const change of changes) {
|
for (const change of changes) {
|
||||||
let license = change.license
|
let license = change.license
|
||||||
// TODO: be loud about unknown licenses
|
|
||||||
if (license === null) {
|
if (license === null) {
|
||||||
unknown.push(change)
|
unknown.push(change)
|
||||||
continue
|
continue
|
||||||
|
|||||||
+2
-1
@@ -59,10 +59,11 @@ async function run(): Promise<void> {
|
|||||||
|
|
||||||
if (licenseErrors.length > 0) {
|
if (licenseErrors.length > 0) {
|
||||||
printLicensesError(licenseErrors, licenses)
|
printLicensesError(licenseErrors, licenses)
|
||||||
printNullLicenses(unknownLicenses)
|
|
||||||
core.setFailed('Dependency review detected incompatible licenses.')
|
core.setFailed('Dependency review detected incompatible licenses.')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printNullLicenses(unknownLicenses)
|
||||||
|
|
||||||
if (failed) {
|
if (failed) {
|
||||||
core.setFailed('Dependency review detected vulnerable packages.')
|
core.setFailed('Dependency review detected vulnerable packages.')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user