From 7ad0a464e6633557a1ea996d16db1e856b48152c Mon Sep 17 00:00:00 2001 From: milankomaj Date: Fri, 2 Aug 2024 12:48:39 +0200 Subject: [PATCH] --- package.json | 2 +- src/github.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 174ac9f..bf23a05 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "scripts": { "Npm-install": "npm install --save", "E-build": "esbuild ./updater.js --format=esm --target=esnext --bundle --platform=node --minify --analyze --log-level=debug --tree-shaking=true --external:svgo --outfile=dist/esbuild_updater.js --resolve-extensions=.json,.js,.ts --legal-comments=eof", - "update": "node ./updater.js $GITHUB_owner -info -svgo" + "update": "node ./updater.js $GITHUB_owner -debug -svgo" }, "dependencies": { "@octokit/plugin-paginate-graphql": "^5.2.2", diff --git a/src/github.js b/src/github.js index 9a6898d..7694ce1 100644 --- a/src/github.js +++ b/src/github.js @@ -311,12 +311,12 @@ class GithubUser { }); if (response.status === 202) { - const retryAfter = parseInt(response.headers["Retry-After"], 10) || 10; // Handle missing or invalid headers + const retryAfter = parseInt(response.headers["Retry-After"]) || 10; // Handle missing or invalid headers octokit.log.info( `${util.color.blue(response.status)} ` + `${util.color.green(repo)} ` + `(${util.color.blue("retry")} ${util.color.yellow((retryCount) + 1)}) ` + - `${util.color.green(retryAfter) + " s"} ` + `${util.color.green(retryAfter) + "s"} ` ); await new Promise((resolve) => setTimeout(resolve, retryAfter * 1000)); retryCount++;