From ecf891370104e819fc1b46c7a10a8f5a672809e8 Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Sun, 11 Apr 2021 22:58:30 +0200 Subject: [PATCH] Update index.mjs --- source/app/action/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/app/action/index.mjs b/source/app/action/index.mjs index 17e9b2d3..6727b392 100644 --- a/source/app/action/index.mjs +++ b/source/app/action/index.mjs @@ -104,7 +104,7 @@ info("Use mocked API", true) } //Test token validity - else if (!/^(?:MOCKED_TOKEN|NOT_NEEDED)$/.test(token)) { + else if (!/^NOT_NEEDED$/.test(token)) { const {headers} = await api.rest.request("HEAD /") if (!("x-oauth-scopes" in headers)) throw new Error("GitHub API did not send any \"x-oauth-scopes\" header back from provided \"token\". It means that your token may not be valid or you're using GITHUB_TOKEN which cannot be used since metrics will fetch data outside of this repository scope. Use a personal access token instead (see https://github.com/lowlighter/metrics/blob/master/.github/readme/partials/setup/action/setup.md for more informations).")