Merge pull request #388 from actions/dependabot/npm_and_yarn/octokit/plugin-retry-4.1.1

Bump @octokit/plugin-retry from 4.0.4 to 4.1.1
This commit is contained in:
Federico Builes
2023-01-30 08:36:50 +01:00
committed by GitHub
4 changed files with 25 additions and 11 deletions
Generated Vendored
+16 -2
View File
@@ -8574,6 +8574,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var Bottleneck = _interopDefault(__nccwpck_require__(1174));
var requestError = __nccwpck_require__(537);
// @ts-ignore
async function errorRequest(octokit, state, error, options) {
@@ -8606,10 +8607,23 @@ async function wrapRequest(state, request, options) {
return after * state.retryAfterBaseValue;
}
});
return limiter.schedule(request, options);
return limiter.schedule(requestWithGraphqlErrorHandling.bind(null, request), options);
}
// @ts-ignore
async function requestWithGraphqlErrorHandling(request, options) {
const response = await request(request, options);
if (response.data && response.data.errors && /Something went wrong while executing your query/.test(response.data.errors[0].message)) {
// simulate 500 request error for retry handling
const error = new requestError.RequestError(response.data.errors[0].message, 500, {
request: options,
response
});
throw error;
}
return response;
}
const VERSION = "4.0.4";
const VERSION = "4.1.1";
function retry(octokit, octokitOptions) {
const state = Object.assign({
enabled: true,
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -7
View File
@@ -11,7 +11,7 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@octokit/plugin-retry": "^4.0.4",
"@octokit/plugin-retry": "^4.1.1",
"@octokit/request-error": "^2.1.0",
"ansi-styles": "^6.2.1",
"got": "^12.5.3",
@@ -1577,9 +1577,9 @@
}
},
"node_modules/@octokit/plugin-retry": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-4.0.4.tgz",
"integrity": "sha512-d7qGFLR3AH+WbNEDUvBPgMc7wRCxU40FZyNXFFqs8ISw75ZYS5/P3ScggzU13dCoY0aywYDxKugGstQTwNgppA==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-4.1.1.tgz",
"integrity": "sha512-iR7rg5KRSl6L6RELTQQ3CYeNgeBJyuAmP95odzcQ/zyefnRT/Peo8rWeky4z7V/+/oPWqOL4I5Z+V8KtjpHCJw==",
"dependencies": {
"@octokit/types": "^9.0.0",
"bottleneck": "^2.15.3"
@@ -9549,9 +9549,9 @@
}
},
"@octokit/plugin-retry": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-4.0.4.tgz",
"integrity": "sha512-d7qGFLR3AH+WbNEDUvBPgMc7wRCxU40FZyNXFFqs8ISw75ZYS5/P3ScggzU13dCoY0aywYDxKugGstQTwNgppA==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-4.1.1.tgz",
"integrity": "sha512-iR7rg5KRSl6L6RELTQQ3CYeNgeBJyuAmP95odzcQ/zyefnRT/Peo8rWeky4z7V/+/oPWqOL4I5Z+V8KtjpHCJw==",
"requires": {
"@octokit/types": "^9.0.0",
"bottleneck": "^2.15.3"
+1 -1
View File
@@ -27,7 +27,7 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@octokit/plugin-retry": "^4.0.4",
"@octokit/plugin-retry": "^4.1.1",
"@octokit/request-error": "^2.1.0",
"ansi-styles": "^6.2.1",
"got": "^12.5.3",