Skip to content

Commit

Permalink
workflow: improve release script ci status check
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 14, 2024
1 parent 8296e19 commit 1e42f24
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,11 @@ async function getCIResult() {
`https://github.com/gitapi/repos/vuejs/core/actions/runs?head_sha=${sha}` +
`&status=success&exclude_pull_requests=true`,
)
/** @type {{ workflow_runs: ({ name: string, conclusion: string })[] }} */
const data = await res.json()
return data.workflow_runs.length > 0
return data.workflow_runs.some(({ name, conclusion }) => {
return name === 'ci' && conclusion === 'success'
})
} catch {
console.error('Failed to get CI status for current commit.')
return false
Expand Down

0 comments on commit 1e42f24

Please sign in to comment.