]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
workflow: improve release script ci status check
authorEvan You <yyx990803@gmail.com>
Fri, 14 Jun 2024 15:59:12 +0000 (17:59 +0200)
committerEvan You <yyx990803@gmail.com>
Fri, 14 Jun 2024 15:59:12 +0000 (17:59 +0200)
scripts/release.js

index d34f26d4bba16e1f07a1f79811a9be002cd7f4cf..4a0c968e286e8494f18106f890a9c8c4b2430053 100644 (file)
@@ -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