()
| 317 | } |
| 318 | |
| 319 | async function getCIResult() { |
| 320 | try { |
| 321 | const sha = await getSha() |
| 322 | const res = await fetch( |
| 323 | `https://api.github.com/repos/vuejs/core/actions/runs?head_sha=${sha}` + |
| 324 | `&status=success&exclude_pull_requests=true`, |
| 325 | ) |
| 326 | /** @type {{ workflow_runs: ({ name: string, conclusion: string })[] }} */ |
| 327 | const data = await res.json() |
| 328 | return data.workflow_runs.some(({ name, conclusion }) => { |
| 329 | return name === 'ci' && conclusion === 'success' |
| 330 | }) |
| 331 | } catch { |
| 332 | console.error('Failed to get CI status for current commit.') |
| 333 | return false |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | async function isInSyncWithRemote() { |
| 338 | try { |
no test coverage detected