renovate
renovate copied to clipboard
Evaluate pr/branch limits per-branch
Describe the proposed change(s).
Current, limit are calculated prior to branch execution: https://github.com/renovatebot/renovate/blob/ed7b17acc9d03bc56bedccb7d39cff5b9c5c844d/lib/workers/repository/process/write.ts#L130-L138
And evaluated within branch execution such as https://github.com/renovatebot/renovate/blob/ed7b17acc9d03bc56bedccb7d39cff5b9c5c844d/lib/workers/repository/update/branch/index.ts#L212-L224
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:
- https://github.com/renovatebot/renovate/blob/ed7b17acc9d03bc56bedccb7d39cff5b9c5c844d/lib/workers/repository/process/write.ts#L132
- https://github.com/renovatebot/renovate/blob/ed7b17acc9d03bc56bedccb7d39cff5b9c5c844d/lib/workers/repository/process/write.ts#L138
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