mirror of https://github.com/vuejs/core.git
workflow: improve release script ci status check
This commit is contained in:
parent
8296e19855
commit
1e42f24d8f
|
@ -352,8 +352,11 @@ async function getCIResult() {
|
|||
`https://api.github.com/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
|
||||
|
|
Loading…
Reference in New Issue