Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(limits): Refactor global limits counter #7931

Merged
merged 5 commits into from
Dec 11, 2020

Conversation

zharinov
Copy link
Collaborator

Changes:

Introduce allowUnlimited flag:

  • true for commit per-run setting. Can be set via CLI only.
  • false for PR and branch per-repo limits. Options are set via config, but max limit values are calculated per-repo and can be 0 when limit reached.

Context:

Ref: #7198

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added unit tests, or
  • Unit tests + ran on a real repository

Comment on lines 27 to 29
if (val > 0) {
max = val;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for backwar compability?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Well, I think we can get rid of this flag completely.

@zharinov zharinov marked this pull request as draft December 10, 2020 06:19
@zharinov zharinov marked this pull request as ready for review December 10, 2020 07:53
@zharinov zharinov marked this pull request as draft December 10, 2020 07:54
@zharinov zharinov marked this pull request as ready for review December 10, 2020 08:00
...limit,
max: maxVal,
});
if (max === null || typeof max === 'number') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference here - undefined is skipped altogether?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, undefined now also means limit reset

@rarkins rarkins merged commit c98a537 into renovatebot:master Dec 11, 2020
@rarkins rarkins deleted the refactor/global-limits-counter branch December 11, 2020 08:26
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 23.100.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants