This commit is contained in:
Stephan 2021-12-16 16:04:40 +01:00
parent bccd87fe75
commit b7be07cd11

View File

@ -49,7 +49,7 @@ jobs:
}) })
console.log(`retrieved ${projects.data.length} projects.`) console.log(`retrieved ${projects.data.length} projects.`)
const project = firstOrDefault(projects.data, (x) => x.name === project_name) const project = firstOrDefault(projects.data, (x) => x.name === project_name)
if (project === null) { if (!project) {
core.setFailed(`Failed to find project "${project_name}".`) core.setFailed(`Failed to find project "${project_name}".`)
return return
} }
@ -64,7 +64,7 @@ jobs:
}) })
console.log(`retrieved ${columns.data.length} columns.`) console.log(`retrieved ${columns.data.length} columns.`)
const column = firstOrDefault(columns.data, (x) => x.name === column_name) const column = firstOrDefault(columns.data, (x) => x.name === column_name)
if (column === null) { if (!column) {
core.setFailed(`Failed to find column "${column_name}" in project ${project.name}.`) core.setFailed(`Failed to find column "${column_name}" in project ${project.name}.`)
return return
} }
@ -82,7 +82,7 @@ jobs:
if (event_name === 'pull_request') { if (event_name === 'pull_request') {
content_type = 'PullRequest' content_type = 'PullRequest'
} }
if (content_type === null) { if (!content_type) {
core.setFailed(`Unexpected event name "${event_name}".`) core.setFailed(`Unexpected event name "${event_name}".`)
return return
} }
@ -97,7 +97,7 @@ jobs:
repo: context.repo.repo, repo: context.repo.repo,
issue_number: context.issue.number issue_number: context.issue.number
}) })
if (item === null) { if (!item) {
core.setFailed(`Failed to get issue ${context.issue.number}.`) core.setFailed(`Failed to get issue ${context.issue.number}.`)
return return
} }