Compatibility with the latest cargo-audit output format

This commit is contained in:
svartalf
2020-01-26 20:19:18 +03:00
parent 35fc20ed69
commit 86207092bb
9 changed files with 1267 additions and 282 deletions
+3 -3
View File
@@ -67,17 +67,17 @@ export async function run(actionInput: input.Input): Promise<void> {
const client = new github.GitHub(actionInput.token, {
userAgent: USER_AGENT,
});
const advisories = report.vulnerabilities.list.concat(report.warnings);
const advisories = report.vulnerabilities.list;
if (github.context.eventName == 'schedule') {
core.debug(
'Action was triggered on a schedule event, creating an Issues report',
);
await reporter.reportIssues(client, advisories);
await reporter.reportIssues(client, advisories, report.warnings);
} else {
core.debug(
`Action was triggered on a ${github.context.eventName} event, creating a Check report`,
);
await reporter.reportCheck(client, advisories);
await reporter.reportCheck(client, advisories, report.warnings);
}
}