Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2021-07-27 22:25:35 +00:00
parent 50cb464f4a
commit 0cae9d939e
62 changed files with 70 additions and 40448 deletions

View file

@ -43,30 +43,31 @@ async function wrapRequest(state, request, options) {
return limiter.schedule(request, options);
}
const VERSION = "3.0.3";
function retry(octokit, octokitOptions = {}) {
const VERSION = "3.0.9";
function retry(octokit, octokitOptions) {
const state = Object.assign({
enabled: true,
retryAfterBaseValue: 1000,
doNotRetry: [400, 401, 403, 404, 422],
retries: 3
}, octokitOptions.retry);
octokit.retry = {
retryRequest: (error, retries, retryAfter) => {
error.request.request = Object.assign({}, error.request.request, {
retries: retries,
retryAfter: retryAfter
});
return error;
}
};
if (!state.enabled) {
return;
if (state.enabled) {
octokit.hook.error("request", errorRequest.bind(null, octokit, state));
octokit.hook.wrap("request", wrapRequest.bind(null, state));
}
octokit.hook.error("request", errorRequest.bind(null, octokit, state));
octokit.hook.wrap("request", wrapRequest.bind(null, state));
return {
retry: {
retryRequest: (error, retries, retryAfter) => {
error.request.request = Object.assign({}, error.request.request, {
retries: retries,
retryAfter: retryAfter
});
return error;
}
}
};
}
retry.VERSION = VERSION;

File diff suppressed because one or more lines are too long