From d5c2f70a7f0a8b43b38b7f7a06b5afd717d8f172 Mon Sep 17 00:00:00 2001 From: Stefan Petrushevski Date: Wed, 8 Mar 2023 15:23:57 +0100 Subject: [PATCH] no inline config options due to limitations --- src/config.ts | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/config.ts b/src/config.ts index 18ae706..7082f98 100644 --- a/src/config.ts +++ b/src/config.ts @@ -35,9 +35,6 @@ function readInlineConfig(): ConfigurationOptionsPartial { const base_ref = getOptionalInput('base-ref') const head_ref = getOptionalInput('head-ref') const comment_summary_in_pr = getOptionalBoolean('comment-summary-in-pr') - const allow_dependencies_licenses = parseRecord( - getOptionalRecord('allow-dependencies-licenses') - ) validateLicenses('allow-licenses', allow_licenses) validateLicenses('deny-licenses', deny_licenses) @@ -47,7 +44,6 @@ function readInlineConfig(): ConfigurationOptionsPartial { fail_on_scopes, allow_licenses, deny_licenses, - allow_dependencies_licenses, allow_ghsas, license_check, vulnerability_check, @@ -71,28 +67,6 @@ function getOptionalInput(name: string): string | undefined { return value.length > 0 ? value : undefined } -function getOptionalRecord( - records: string -): Record | undefined { - const value = core.getInput(records) - return value.length > 0 ? YAML.parse(value) : undefined -} - -function parseRecord( - records: Record | undefined -): Record | undefined { - if (records === undefined) { - return records - } else { - return Object.fromEntries( - Object.entries(records).map(([key, value]) => [ - key, - value.map(x => x.trim()) - ]) - ) - } -} - function parseList(list: string | undefined): string[] | undefined { if (list === undefined) { return list