adding dist
This commit is contained in:
+21
-1
@@ -206,6 +206,7 @@ const git_refs_1 = __nccwpck_require__(1086);
|
|||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
|
let failed = false;
|
||||||
const config = (0, config_1.readConfig)();
|
const config = (0, config_1.readConfig)();
|
||||||
const refs = (0, git_refs_1.getRefs)(config, github.context);
|
const refs = (0, git_refs_1.getRefs)(config, github.context);
|
||||||
const changes = yield dependencyGraph.compare({
|
const changes = yield dependencyGraph.compare({
|
||||||
@@ -215,7 +216,6 @@ function run() {
|
|||||||
headRef: refs.head
|
headRef: refs.head
|
||||||
});
|
});
|
||||||
const minSeverity = config.fail_on_severity;
|
const minSeverity = config.fail_on_severity;
|
||||||
let failed = false;
|
|
||||||
const licenses = {
|
const licenses = {
|
||||||
allow: config.allow_licenses,
|
allow: config.allow_licenses,
|
||||||
deny: config.deny_licenses
|
deny: config.deny_licenses
|
||||||
@@ -240,6 +240,7 @@ function run() {
|
|||||||
}
|
}
|
||||||
printNullLicenses(unknownLicenses);
|
printNullLicenses(unknownLicenses);
|
||||||
summary.addLicensesToSummary(licenseErrors, unknownLicenses, config);
|
summary.addLicensesToSummary(licenseErrors, unknownLicenses, config);
|
||||||
|
printScannedDependencies(changes);
|
||||||
if (failed) {
|
if (failed) {
|
||||||
core.setFailed('Dependency review detected vulnerable packages.');
|
core.setFailed('Dependency review detected vulnerable packages.');
|
||||||
}
|
}
|
||||||
@@ -301,6 +302,25 @@ function printNullLicenses(changes) {
|
|||||||
core.info(`${ansi_styles_1.default.bold.open}${change.manifest} » ${change.name}@${change.version}${ansi_styles_1.default.bold.close}`);
|
core.info(`${ansi_styles_1.default.bold.open}${change.manifest} » ${change.name}@${change.version}${ansi_styles_1.default.bold.close}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function printScannedDependencies(changes) {
|
||||||
|
core.group('Dependency changes', () => __awaiter(this, void 0, void 0, function* () {
|
||||||
|
// group changes by manifest
|
||||||
|
const dependencies = {};
|
||||||
|
for (const change of changes) {
|
||||||
|
if (dependencies[change.manifest] === undefined) {
|
||||||
|
dependencies[change.manifest] = [];
|
||||||
|
}
|
||||||
|
dependencies[change.manifest].push(change);
|
||||||
|
}
|
||||||
|
for (const [manifestName, manifestChanges] of Object.entries(dependencies)) {
|
||||||
|
core.group(manifestName, () => __awaiter(this, void 0, void 0, function* () {
|
||||||
|
for (const change of manifestChanges) {
|
||||||
|
core.info(`${change.change_type} ${change.name}@${change.version}`);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
run();
|
run();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user