Adds 'info', 'none' as a valid argument for audit-level (#120)
* Adds 'info', 'none' as a valid argument for audit-level * 2.1.0
This commit is contained in:
2
dist/index.js
vendored
2
dist/index.js
vendored
@@ -187,7 +187,7 @@ function run() {
|
||||
core.info(`Current working directory: ${process.cwd()}`);
|
||||
// get audit-level
|
||||
const auditLevel = core.getInput('audit_level', { required: true });
|
||||
if (!['critical', 'high', 'moderate', 'low'].includes(auditLevel)) {
|
||||
if (!['critical', 'high', 'moderate', 'low', 'info', 'none'].includes(auditLevel)) {
|
||||
throw new Error('Invalid input: audit_level');
|
||||
}
|
||||
const productionFlag = core.getInput('production_flag', { required: false });
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "npm-audit-action",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "npm-audit-action",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.6.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "npm-audit-action",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"private": true,
|
||||
"description": "GitHub Action to run `npm audit`",
|
||||
"main": "lib/main.js",
|
||||
|
||||
@@ -21,7 +21,11 @@ export async function run(): Promise<void> {
|
||||
|
||||
// get audit-level
|
||||
const auditLevel = core.getInput('audit_level', {required: true})
|
||||
if (!['critical', 'high', 'moderate', 'low'].includes(auditLevel)) {
|
||||
if (
|
||||
!['critical', 'high', 'moderate', 'low', 'info', 'none'].includes(
|
||||
auditLevel
|
||||
)
|
||||
) {
|
||||
throw new Error('Invalid input: audit_level')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user