chore: workflows and pipeline state were split in the circle API (#21441)
This commit is contained in:
parent
3cb0ed306b
commit
ec0edb757a
1 changed files with 3 additions and 2 deletions
|
@ -106,8 +106,9 @@ async function getCircleCIWorkflowId (pipelineId) {
|
||||||
const pipelineInfo = await circleCIRequest(pipelineInfoUrl, 'GET')
|
const pipelineInfo = await circleCIRequest(pipelineInfoUrl, 'GET')
|
||||||
switch (pipelineInfo.state) {
|
switch (pipelineInfo.state) {
|
||||||
case 'created': {
|
case 'created': {
|
||||||
if (pipelineInfo.workflows.length === 1) {
|
const workflows = await circleCIRequest(`${pipelineInfoUrl}/workflow`, 'GET')
|
||||||
workflowId = pipelineInfo.workflows[0].id
|
if (workflows.items.length === 1) {
|
||||||
|
workflowId = workflows.items[0].id
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
console.log('Unxpected number of workflows, response was:', pipelineInfo)
|
console.log('Unxpected number of workflows, response was:', pipelineInfo)
|
||||||
|
|
Loading…
Reference in a new issue