Skip to content

Commit

Permalink
fix: getInput returns empty string instead of null when no input is g…
Browse files Browse the repository at this point in the history
…iven
  • Loading branch information
PatrickHeneise committed Nov 29, 2021
1 parent add1734 commit aa33eec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
7 changes: 0 additions & 7 deletions cloudflare.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ export default async function getDeploymentUrl(
core.debug(`Looking for matching deployments ${repo}/${branch}`)

const builds = data.result
.map((d) => {
core.info('-- temporary debugging --')
core.info(
`sha: ${commitHash}, ${typeof commitHash} ${commitHash === null}`
)
return d
})
.filter(
(d) =>
d && d.source && d.source.config && d.source.config.repo_name === repo
Expand Down
11 changes: 3 additions & 8 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ async function run() {
const projectId = core.getInput('cloudflare_project_id')
const waitForDeploymentReady = core.getInput('wait_until_ready')
const environment = core.getInput('environment', { required: false })
const commitHash = core.getInput('commit_hash', { required: false })
const inputHash = core.getInput('commit_hash', { required: false })
const commitHash = inputHash === '' || inputHash === null ? null : inputHash

core.info(
`Retrieving deployment preview for ${githubRepo}/${githubBranch} ...`
Expand Down

0 comments on commit aa33eec

Please sign in to comment.