Updates to v1.3.2 with node16

This commit is contained in:
pinkforest(she/her)
2023-03-28 11:24:53 +11:00
committed by pinkforest
parent 9448c34627
commit 13d7e3e1c9
10 changed files with 8238 additions and 8602 deletions
+4 -10
View File
@@ -4,16 +4,12 @@ import * as os from 'os';
import * as core from '@actions/core';
import * as github from '@actions/github';
import { Cargo } from '@actions-rs/core';
import { Cargo } from '@rinse-repeat/actions-rs-core';
import * as input from './input';
import * as interfaces from './interfaces';
import * as reporter from './reporter';
const pkg = require('../package.json'); // eslint-disable-line @typescript-eslint/no-var-requires
const USER_AGENT = `${pkg.name}/${pkg.version} (${pkg.bugs.url})`;
async function getData(
ignore: string[] | undefined,
): Promise<interfaces.Report> {
@@ -84,20 +80,18 @@ export async function run(actionInput: input.Input): Promise<void> {
return;
}
const client = new github.GitHub(actionInput.token, {
userAgent: USER_AGENT,
});
// const octokit = github.getOctokit(actionInput.token, {userAgent: USER_AGENT});
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, warnings);
await reporter.reportIssues(actionInput.token, advisories, warnings);
} else {
core.debug(
`Action was triggered on a ${github.context.eventName} event, creating a Check report`,
);
await reporter.reportCheck(client, advisories, warnings);
await reporter.reportCheck(actionInput.token, advisories, warnings);
}
}