From 0481c0edd24424785ca2cd077d0600a5ff80394b Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Sun, 20 Feb 2022 21:36:23 +0100 Subject: [PATCH] Allow Github token authorization for all API versions The current master branch allows authorization via the GITHUB_TOKEN option only for v1 and v2. The dev branch contains a fix for this, https://github.com/eduardoboucas/staticman/pull/405/commits/1f31ac827f13d9aaf94030bf4417b361e79242b7 but the pull request has been open for quite some time, https://github.com/eduardoboucas/staticman/pull/405 Unfortunately, the dev branch does not seem to work out of the box for me, so I will just use this small patch to make Staticman work for me for the time being. --- lib/GitHub.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/GitHub.js b/lib/GitHub.js index 67558241..ce8b6962 100644 --- a/lib/GitHub.js +++ b/lib/GitHub.js @@ -18,8 +18,7 @@ class GitHub extends GitService { return (async () => { const isAppAuth = config.get('githubAppID') && config.get('githubPrivateKey') - const isLegacyAuth = config.get('githubToken') && - ['1', '2'].includes(options.version) + const isLegacyAuth = config.get('githubToken') let authToken