From 48b74d8dbee7042f7880ad112dcd46d934f39614 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 2 Sep 2020 16:12:38 +0000 Subject: [PATCH] build(release): compiled action for 1.1.2 [skip ci] --- dist/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index c0353fa..4c3ccff 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1289,7 +1289,7 @@ function requiresAppAuth(url) { return !!url && REGEX.test(url); } -const SIXTY_SECONDS_IN_MS = 60 * 1000; +const FIVE_SECONDS_IN_MS = 5 * 1000; async function hook(state, request, route, parameters) { let endpoint = request.endpoint.merge(route, parameters); @@ -1326,19 +1326,19 @@ async function sendRequestWithRetries(request, options, createdAt, retries = 0) throw error; } - if (timeSinceTokenCreationInMs >= SIXTY_SECONDS_IN_MS) { + if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) { throw error; } ++retries; - const awaitTime = retries * retries * 1000; + const awaitTime = retries * 1000; console.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime}ms)`); await new Promise(resolve => setTimeout(resolve, awaitTime)); return sendRequestWithRetries(request, options, createdAt, retries); } } -const VERSION = "2.4.14"; +const VERSION = "2.4.15"; const createAppAuth = function createAppAuth(options) { const state = Object.assign({