Evaluate pr/branch limits per-branch
Opened this issue · 1 comments
Describe the proposed change(s).
Current, limit are calculated prior to branch execution:
renovate/lib/workers/repository/process/write.ts
Lines 130 to 138 in ed7b17a
And evaluated within branch execution such as
renovate/lib/workers/repository/update/branch/index.ts
Lines 212 to 224 in ed7b17a
Much of the logic is also inside https://github.com/renovatebot/renovate/blob/main/lib/workers/repository/process/limits.ts
Instead of having global limits as today, we should instead allow separate limits per-branch, and evaluate those limits per-branch instead. This means removing these global limit settings:
And instead passing the relevant limit like prBranchLimit
and prConcurrentLimit
through to the "is limit reached?" functions.
Ideally the point in our workers where these limits are evaluated is kept the same as today so that there is "less changes" and risk of breaking things. And so the change is that the limits are passed through rather than used globally.
Note: commits will still be global
I've begun initial refactorings for this in https://github.com/renovatebot/renovate/compare/feat/per-branch-limits?expand=1