diff --git a/source/app/action/index.mjs b/source/app/action/index.mjs index 73abe773..01a31e3b 100644 --- a/source/app/action/index.mjs +++ b/source/app/action/index.mjs @@ -145,6 +145,9 @@ async function retry(func, {retries = 1, delay = 0} = {}) { //Token for data gathering info("GitHub token", token, {token:true}) + //A GitHub token should start with "gh" along an additional letter for type + //See https://github.blog/2021-04-05-behind-githubs-new-authentication-token-formats + info("GitHub token format", /^gh[pousr]_/.test(token) ? "correct" : "(old or invalid)") if (!token) throw new Error("You must provide a valid GitHub personal token to gather your metrics (see https://github.com/lowlighter/metrics/blob/master/.github/readme/partials/setup/action/setup.md for more informations)") conf.settings.token = token diff --git a/source/app/metrics/metadata.mjs b/source/app/metrics/metadata.mjs index 486ff706..3f26da47 100644 --- a/source/app/metrics/metadata.mjs +++ b/source/app/metrics/metadata.mjs @@ -253,13 +253,11 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) { if ((key in preset)&&(unspecified)) { console.debug(`metrics/inputs > ${key} has been set by preset value`) q[key] = preset[key] - continue } //From defaults else if (unspecified) { console.debug(`metrics/inputs > ${key} has been set by default value`) q[key] = metadata.inputs[key]?.default - continue } //From user else {