Skip to content

Commit

Permalink
action.cjs: input delete if empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
thypon committed May 30, 2024
1 parent e109d3f commit a829e5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions action.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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_' })

Expand Down

0 comments on commit a829e5a

Please sign in to comment.