Print config files.

This commit is contained in:
Federico Builes
2022-05-12 11:43:08 +02:00
parent 744ab92b2c
commit 52795b8e93
2 changed files with 19 additions and 0 deletions

8
.github/dr-action.yml vendored Normal file
View 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"

View File

@@ -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 {