From ec0edb757ae1734b48f4c918edfdce25d51dec15 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 9 Dec 2019 11:26:43 -0800 Subject: [PATCH] chore: workflows and pipeline state were split in the circle API (#21441) --- script/release/ci-release-build.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/release/ci-release-build.js b/script/release/ci-release-build.js index d3b9fbdb63..3bbcf49ddb 100644 --- a/script/release/ci-release-build.js +++ b/script/release/ci-release-build.js @@ -106,8 +106,9 @@ async function getCircleCIWorkflowId (pipelineId) { const pipelineInfo = await circleCIRequest(pipelineInfoUrl, 'GET') switch (pipelineInfo.state) { case 'created': { - if (pipelineInfo.workflows.length === 1) { - workflowId = pipelineInfo.workflows[0].id + const workflows = await circleCIRequest(`${pipelineInfoUrl}/workflow`, 'GET') + if (workflows.items.length === 1) { + workflowId = workflows.items[0].id break } console.log('Unxpected number of workflows, response was:', pipelineInfo)