MCPcopy
hub / github.com/vuejs/core / getCIResult

Function getCIResult

scripts/release.js:319–335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

317}
318
319async 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
337async function isInSyncWithRemote() {
338 try {

Callers 1

runTestsIfNeededFunction · 0.85

Calls 3

getShaFunction · 0.85
someMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected