This is a simple means for ensuring that calls to the GitHub API do not "swamp" the interface. Dispatching all API calls in one hit appears to cause sporadic 403s to be returned.
It uses the Bluebird Promise to access Promise.map and use the concurrency parameter to regulate the number of promises dispatched at any one time. The number is controlled by the GitHub Actions secret (no need to be a secret really, but this seemed the easiest way) GH_API_CONCURRENCY_LIMIT. This value can therefore be tweaked as required without necessitating a code change.
This is a simple means for ensuring that calls to the GitHub API do not "swamp" the interface. Dispatching all API calls in one hit appears to cause sporadic 403s to be returned.
It uses the Bluebird Promise to access
Promise.map
and use theconcurrency
parameter to regulate the number of promises dispatched at any one time. The number is controlled by the GitHub Actions secret (no need to be a secret really, but this seemed the easiest way)GH_API_CONCURRENCY_LIMIT
. This value can therefore be tweaked as required without necessitating a code change.