feat: retry github api requests

This commit is contained in:
Peter Evans 2021-05-31 09:37:41 +09:00
parent 093c191148
commit 29708c335a
4 changed files with 1632 additions and 1 deletions

1616
dist/index.js vendored

File diff suppressed because it is too large Load diff

14
package-lock.json generated
View file

@ -8653,6 +8653,15 @@
"deprecation": "^2.3.1" "deprecation": "^2.3.1"
} }
}, },
"@octokit/plugin-retry": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.7.tgz",
"integrity": "sha512-n08BPfVeKj5wnyH7IaOWnuKbx+e9rSJkhDHMJWXLPv61625uWjsN8G7sAW3zWm9n9vnS4friE7LL/XLcyGeG8Q==",
"requires": {
"@octokit/types": "^6.0.3",
"bottleneck": "^2.15.3"
}
},
"@octokit/request": { "@octokit/request": {
"version": "5.6.0", "version": "5.6.0",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.0.tgz", "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.0.tgz",
@ -9223,6 +9232,11 @@
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ=="
}, },
"bottleneck": {
"version": "2.19.5",
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
},
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",

View file

@ -34,6 +34,7 @@
"@octokit/core": "3.5.1", "@octokit/core": "3.5.1",
"@octokit/plugin-paginate-rest": "2.14.0", "@octokit/plugin-paginate-rest": "2.14.0",
"@octokit/plugin-rest-endpoint-methods": "5.5.0", "@octokit/plugin-rest-endpoint-methods": "5.5.0",
"@octokit/plugin-retry": "3.0.7",
"https-proxy-agent": "5.0.0", "https-proxy-agent": "5.0.0",
"uuid": "8.3.2" "uuid": "8.3.2"
}, },

View file

@ -1,6 +1,7 @@
import {Octokit as Core} from '@octokit/core' import {Octokit as Core} from '@octokit/core'
import {paginateRest} from '@octokit/plugin-paginate-rest' import {paginateRest} from '@octokit/plugin-paginate-rest'
import {restEndpointMethods} from '@octokit/plugin-rest-endpoint-methods' import {restEndpointMethods} from '@octokit/plugin-rest-endpoint-methods'
import {retry} from '@octokit/plugin-retry'
import {HttpsProxyAgent} from 'https-proxy-agent' import {HttpsProxyAgent} from 'https-proxy-agent'
export {RestEndpointMethodTypes} from '@octokit/plugin-rest-endpoint-methods' export {RestEndpointMethodTypes} from '@octokit/plugin-rest-endpoint-methods'
export {OctokitOptions} from '@octokit/core/dist-types/types' export {OctokitOptions} from '@octokit/core/dist-types/types'
@ -8,6 +9,7 @@ export {OctokitOptions} from '@octokit/core/dist-types/types'
export const Octokit = Core.plugin( export const Octokit = Core.plugin(
paginateRest, paginateRest,
restEndpointMethods, restEndpointMethods,
retry,
autoProxyAgent autoProxyAgent
) )