ci/github-script/bot: limit concurrency in PR runs

This lead to reaching secondary API limits in a treewide recently, so we
better limit it to where we actually need it.
This commit is contained in:
Wolfgang Walther
2025-11-06 16:16:30 +01:00
parent 17199e5ff6
commit cd7f83638e

View File

@@ -576,7 +576,10 @@ module.exports = async ({ github, context, core, dry }) => {
// Controls level of parallelism. Applies to both the number of concurrent requests
// as well as the number of concurrent workers going through the list of PRs.
const maxConcurrent = 20
// We'll only boost concurrency when we're running many PRs in parallel on a schedule,
// but not for single PRs. This avoids things going wild, when we accidentally make
// too many API requests on treewides.
const maxConcurrent = context.eventName === 'pull_request' ? 1 : 20
await withRateLimit({ github, core, maxConcurrent }, async (stats) => {
if (context.payload.pull_request) {