From a829e5a06c045cd9ac965af7e75a0c7f5d9a9f95 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Thu, 30 May 2024 21:45:45 +0200 Subject: [PATCH] action.cjs: input delete if empty string --- action.cjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.cjs b/action.cjs index 4b8764c0..907b3222 100644 --- a/action.cjs +++ b/action.cjs @@ -32,6 +32,9 @@ module.exports = async ({ github, context, inputs, actionPath, core, debug = fal const { default: getConfig } = await import(`${actionPath}/src/getConfig.js`) const { default: getProperties } = await import(`${actionPath}/src/getProperties.js`) + // delete if empty string in inputs value + Object.keys(inputs).forEach(key => inputs[key] === '' && delete inputs[key]) + const config = await getConfig({ owner: context.repo.owner, repo: context.repo.repo, path: '.github/security-action.json', debug, github }) const properties = await getProperties({ owner: context.repo.owner, repo: context.repo.repo, debug, github, prefix: 'security_action_' })