Skip to content

readKeysLimited

readKeysLimited<T>(input): Promise<T[]>

Defined in: cli/cli/src/plugin/issues-provider/read-keys-limited/read-keys-limited.ts:11

Reads an explicit list of issues in creation order until limit of them are kept. The keys are sorted by number first (see orderKeys), then fetched in small steps of at most concurrency, each step no bigger than the places still open, so an issue that is later skipped (a pull request, a closed one) is replaced by the next key and nothing beyond the budget is fetched unless a skip made room. Within a step the fetches run together; the results keep the key order. The kept items come back oldest first, whichever end was chosen.

T

ReadKeysLimitedInput<T>

Promise<T[]>