Print config files.
This commit is contained in:
8
.github/dr-action.yml
vendored
Normal file
8
.github/dr-action.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
fail_on_severity: critical
|
||||
allow_licenses:
|
||||
- "GPL 3.0"
|
||||
- "BSD 3 Clause"
|
||||
- "MIT"
|
||||
deny_licenses:
|
||||
- "LGPL 2.0"
|
||||
- "BSD 2 Clause"
|
||||
11
src/main.ts
11
src/main.ts
@@ -4,6 +4,7 @@ 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'
|
||||
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
@@ -46,6 +47,16 @@ 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