Skip to content

Commit

Permalink
fix: improve log output wording and level
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickHeneise committed Jan 2, 2023
1 parent 6f0776e commit 9f63ffa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
10 changes: 6 additions & 4 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.

8 changes: 4 additions & 4 deletions src/vercel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ export default async function getDeploymentUrl(repo, branch, options) {
throw new Error('no deployments found')
}

core.debug(`Found ${data.deployments.length} deployments`)
core.debug(`Looking for matching deployments ${repo}/${branch}`)
core.info(`Found ${data.deployments.length} deployments`)
core.info(`Looking for matching deployments ${repo}/${branch}`)
const builds = data.deployments.filter((deployment) => {
return (
deployment.meta.githubCommitRepo === repo &&
deployment.meta.githubCommitRef === branch
)
})

core.debug(`Found ${builds.length} matching builds`)
core.info(`Found ${builds.length} matching deployments`)
if (!builds || builds.length <= 0) {
core.error(JSON.stringify(builds, null, 2))
throw new Error('no deployments found')
throw new Error('no matching deployments found, please check your filters')
}

const build = builds[0]
Expand Down

0 comments on commit 9f63ffa

Please sign in to comment.