Move config into its own file.
This commit is contained in:
+4
-15
@@ -2,9 +2,9 @@ import * as core from '@actions/core'
|
||||
import * as dependencyGraph from './dependency-graph'
|
||||
import * as github from '@actions/github'
|
||||
import styles from 'ansi-styles'
|
||||
import {RequestError} from '@octokit/request-error'
|
||||
import {PullRequestSchema} from './schemas'
|
||||
import * as fs from 'fs'
|
||||
import { RequestError } from '@octokit/request-error'
|
||||
import { PullRequestSchema } from './schemas'
|
||||
|
||||
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
@@ -35,8 +35,7 @@ async function run(): Promise<void> {
|
||||
) {
|
||||
for (const vuln of change.vulnerabilities) {
|
||||
core.info(
|
||||
`${styles.bold.open}${change.manifest} » ${change.name}@${
|
||||
change.version
|
||||
`${styles.bold.open}${change.manifest} » ${change.name}@${change.version
|
||||
}${styles.bold.close} – ${vuln.advisory_summary} ${renderSeverity(
|
||||
vuln.severity
|
||||
)}`
|
||||
@@ -47,16 +46,6 @@ async function run(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO check for file not existing
|
||||
// TODO check for file with both extensions
|
||||
|
||||
var severity: string
|
||||
var allowlist, blocklist: [string]
|
||||
|
||||
var data = fs.readFile("./.github/dep-review.yml", "utf-8", (err, data) => {
|
||||
core.info(data)
|
||||
})
|
||||
|
||||
if (failed) {
|
||||
throw new Error('Dependency review detected vulnerable packages.')
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user