I know this question has been answered with comments like Promise.All has to take an array
. I am certain I am passing an array of promises here but I am still getting the error. My code is as follows:
const promises = [];
chunkOfAnnotations.forEach(chunk => {
promises.push(updateCheckRun(id, chunk))
})
console.log(promises);
console.log(global.Promise)
Promise.All(promises).then(_ => {
core.info('Check runs updated');
}, _ => {
core.setFailed('Error updating check run');
})
I added some console logs to see what the values are as the first console log outputs this:
[
Promise { <pending> },
Promise { <pending> },
Promise { <pending> },
Promise { <pending> },
Promise { <pending> }
]
And the second console log ouputs this: [Function: Promise]
This is for a github action running on Node v14