-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add fields to RateLimits struct #2340
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
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). For more information, open the CLA check for this pull request. |
github/github.go
Outdated
| SourceImport *Rate `json:"source_import"` | ||
| CodeScanningUpload *Rate `json:"code_scanning_upload"` | ||
| ActionsRunnerRegistration *Rate `json:"actions_runner_registration"` | ||
| Scim *Rate `json:"scim"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be no document for source_import, code_scanning_upload, actions_runner_registration, scim.
gmlewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @shokada!
Let's tweak some of the acronym names, please.
Then we should be ready for a second LGTM+Approval before merging.
|
Also please remember to run |
|
Run |
Codecov Report
@@ Coverage Diff @@
## master #2340 +/- ##
=======================================
Coverage 98.04% 98.05%
=======================================
Files 118 118
Lines 10458 10476 +18
=======================================
+ Hits 10254 10272 +18
Misses 140 140
Partials 64 64
Continue to review full report at Codecov.
|
github/github.go
Outdated
| sourceImportCategory //nolint:deadcode,varcheck | ||
| codeScanningUploadCategory //nolint:deadcode,varcheck | ||
| actionsRunnerRegistrationCategory //nolint:deadcode,varcheck | ||
| scimCategory //nolint:deadcode,varcheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since TestClient_rateLimits does not pass, I have defined unused constants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing this, we actually need to use these values in the category function (lines 1127-1134 below) and in the RateLimits method (lines 1154-1163 below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the RateLimits method (lines 1154-1163 below).
fixed a6c7bcd
in the category function (lines 1127-1134 below)
I could not figure out how to fix the category function for the following reasons...
Since there is no documentation for source_import, code_scanning_upload, actions_runner_registration, and scim, I did not know which endpoints had the rate limit set, so I did not fix category function.
#2340 (comment)
github/github.go
Outdated
| sourceImportCategory //nolint:deadcode,varcheck | ||
| codeScanningUploadCategory //nolint:deadcode,varcheck | ||
| actionsRunnerRegistrationCategory //nolint:deadcode,varcheck | ||
| scimCategory //nolint:deadcode,varcheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing this, we actually need to use these values in the category function (lines 1127-1134 below) and in the RateLimits method (lines 1154-1163 below).
gmlewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @shokada !
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
raynigon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you, @raynigon ! |
|
@gmlewis is it possible to get a fresh release pushed out? Thanks! |
|
Yes, I can work on one tomorrow. |
@patrickmarabeas - |
Fixes: #2339
What this PR does / why we need it:
I added fields to
RateLimitsstruct to get rate limits other thancoreandsearchSpecial notes for your reviewer:
Since there is no documentation for
source_import,code_scanning_upload,actions_runner_registration, andscim, I did not know which endpoints had the rate limit set, so I did not fixcategoryfunction.go-github/github/github.go
Lines 1126 to 1134 in 942d33d