mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-06-28 14:16:02 +00:00
node_modules
This commit is contained in:
parent
5e3f23f92c
commit
806116bda4
734 changed files with 224451 additions and 0 deletions
15
node_modules/@octokit/plugin-retry/dist-src/error-request.js
generated
vendored
Normal file
15
node_modules/@octokit/plugin-retry/dist-src/error-request.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// @ts-ignore
|
||||
export async function errorRequest(octokit, state, error, options) {
|
||||
if (!error.request || !error.request.request) {
|
||||
// address https://github.com/octokit/plugin-retry.js/issues/8
|
||||
throw error;
|
||||
}
|
||||
// retry all >= 400 && not doNotRetry
|
||||
if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {
|
||||
const retries = options.request.retries != null ? options.request.retries : state.retries;
|
||||
const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);
|
||||
throw octokit.retry.retryRequest(error, retries, retryAfter);
|
||||
}
|
||||
// Maybe eventually there will be more cases here
|
||||
throw error;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue