fix: adapt to GitHub's rename of abuse limit to secondary rate limit#438
Merged
gr2m merged 2 commits intooctokit:masterfrom Sep 6, 2021
Merged
fix: adapt to GitHub's rename of abuse limit to secondary rate limit#438gr2m merged 2 commits intooctokit:masterfrom
gr2m merged 2 commits intooctokit:masterfrom
Conversation
gr2m
reviewed
Sep 6, 2021
|
|
||
| const { wantRetry, retryAfter } = await (async function () { | ||
| if (/\babuse\b/i.test(error.message)) { | ||
| if (/\bsecondary rate\b/i.test(error.message)) { |
Contributor
There was a problem hiding this comment.
The tests need to be updated. I can do that if you are busy, just let me know.
Do you by chance have the full response error object available, with both the response body and headers?
Contributor
Author
There was a problem hiding this comment.
if you can take care of updating the tests, that'd be great - thanks!
here is the full error log (this was from a graphql request generated by https://github.com/w3c/validate-repos):
status: 403,
response: {
url: 'https://api.github.com/graphql',
status: 403,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset',
connection: 'close',
'content-encoding': 'gzip',
'content-security-policy': "default-src 'none'; base-uri 'self'; block-all-mixed-content; connect-src 'self' uploads.github.com www.githubstatus.com collector.githubapp.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events translator.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com viewscreen.githubusercontent.com; img-src 'self' data: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com collector.githubapp.com avatars.githubusercontent.com github-cloud.s3.amazonaws.com secured-user-images.githubusercontent.com/; manifest-src 'self'; media-src 'none'; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com",
'content-type': 'application/json; charset=utf-8',
date: 'Mon, 06 Sep 2021 12:04:35 GMT',
'expect-ct': 'max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
'retry-after': '60',
server: 'GitHub.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-media-type': 'github.v4; format=json',
'x-github-request-id': '[REDACTED]',
'x-xss-protection': '0'
},
data: {
documentation_url: 'https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#secondary-rate-limits',
message: 'You have exceeded a secondary rate limit. Please wait a few minutes before you try again.'
}
},
request: {
method: 'POST',
url: 'https://api.github.com/graphql',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit-core.js/3.5.1 Node.js/12.22.6 (linux; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"query":"\\n query ($org: String!, $cursor: String) {\\n organization(login: $org) {\\n repositories(first: 10, after: $cursor) {\\n nodes {\\n id\\n name\\n owner {\\n login\\n }\\n isArchived\\n homepageUrl\\n description\\n isPrivate\\n createdAt\\n labels(first: 100) {\\n nodes {\\n name\\n color\\n }\\n pageInfo {\\n endCursor\\n hasNextPage\\n }\\n }\\n defaultBranch: defaultBranchRef {\\n name\\n }\\n branchProtectionRules(first: 5) {\\n nodes {\\n pattern\\n requiredApprovingReviewCount\\n requiredStatusCheckContexts\\n isAdminEnforced\\n }\\n }\\n w3cjson: object(expression: \\"HEAD:w3c.json\\") {\\n ... on Blob {\\n text\\n }\\n }\\n prpreviewjson: object(expression: \\"HEAD:.pr-preview.json\\") {\\n ... on Blob {\\n text\\n }\\n }\\n autoPublish: object(expression: \\"HEAD:.github/workflows/auto-publish.yml\\") {\\n ... on Blob {\\n text\\n }\\n }\\n travis: object(expression: \\"HEAD:.travis.yml\\") {\\n ... on Blob {\\n text\\n }\\n }\\n contributing: object(expression: \\"HEAD:CONTRIBUTING.md\\") {\\n ... on Blob {\\n text\\n }\\n }\\n license: object(expression: \\"HEAD:LICENSE.md\\") {\\n ... on Blob {\\n text\\n }\\n }\\n codeOfConduct {\\n body\\n }\\n readme: object(expression: \\"HEAD:README.md\\") {\\n ... on Blob {\\n text\\n }\\n }\\n }\\n pageInfo {\\n endCursor\\n hasNextPage\\n }\\n }\\n }\\n }\\n","variables":{"org":"w3c","cursor":"Y3Vyc29yOnYyOpHOB8UmtA=="}}',
request: { hook: [Function: bound bound register] }
}
Contributor
|
🎉 This PR is included in version 3.5.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
bflad
added a commit
to bflad/action-migrate-issue
that referenced
this pull request
Dec 10, 2021
bflad
added a commit
to bflad/action-milestone-comment
that referenced
this pull request
Dec 10, 2021
bflad
added a commit
to bflad/action-migrate-issue
that referenced
this pull request
Dec 10, 2021
* Bump @octokit/plugin-throttling from 3.5.0 to 3.5.2 Bumps [@octokit/plugin-throttling](https://github.com/octokit/plugin-throttling.js) from 3.5.0 to 3.5.2. - [Release notes](https://github.com/octokit/plugin-throttling.js/releases) - [Commits](octokit/plugin-throttling.js@v3.5.0...v3.5.2) --- updated-dependencies: - dependency-name: "@octokit/plugin-throttling" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Updates for GitHub secondary rate limit renaming Reference: octokit/plugin-throttling.js#438 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brian Flad <bflad417@gmail.com>
bflad
added a commit
to bflad/action-milestone-comment
that referenced
this pull request
Dec 10, 2021
* Bump @octokit/plugin-throttling from 3.4.2 to 3.5.2 Bumps [@octokit/plugin-throttling](https://github.com/octokit/plugin-throttling.js) from 3.4.2 to 3.5.2. - [Release notes](https://github.com/octokit/plugin-throttling.js/releases) - [Commits](octokit/plugin-throttling.js@v3.4.2...v3.5.2) --- updated-dependencies: - dependency-name: "@octokit/plugin-throttling" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Updates for GitHub secondary rate limit renaming Reference: octokit/plugin-throttling.js#438 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brian Flad <bflad417@gmail.com>
bflad
added a commit
to hashicorp/setup-hc-releases
that referenced
this pull request
Dec 10, 2021
bflad
added a commit
to hashicorp/setup-hc-releases
that referenced
this pull request
Dec 10, 2021
* Bump @octokit/plugin-throttling from 3.5.1 to 3.5.2 Bumps [@octokit/plugin-throttling](https://github.com/octokit/plugin-throttling.js) from 3.5.1 to 3.5.2. - [Release notes](https://github.com/octokit/plugin-throttling.js/releases) - [Commits](octokit/plugin-throttling.js@v3.5.1...v3.5.2) --- updated-dependencies: - dependency-name: "@octokit/plugin-throttling" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Updates for GitHub secondary rate limit renaming Reference: octokit/plugin-throttling.js#438 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brian Flad <bflad417@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #437