From 2ae690fac73120264a7221f821e0e708c11f3fc4 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sat, 29 May 2021 12:09:13 +0200 Subject: [PATCH] Load commit per commit in indepth analyzer --- source/plugins/languages/analyzers.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/plugins/languages/analyzers.mjs b/source/plugins/languages/analyzers.mjs index 4981d005..06dd578c 100644 --- a/source/plugins/languages/analyzers.mjs +++ b/source/plugins/languages/analyzers.mjs @@ -125,7 +125,7 @@ async function analyze({login, imports, data}, {results, path}) { const files = Object.fromEntries(Object.entries(JSON.parse(await imports.run("github-linguist --json", {cwd:path}, {log:false}))).flatMap(([lang, files]) => files.map(file => [file, lang]))) //Processing diff - const per_page = 10 + const per_page = 1 console.debug(`metrics/compute/${login}/plugins > languages > indepth > checking git log`) for (let page = 0; ; page++) { try { @@ -182,7 +182,7 @@ if (/languages.analyzers.mjs$/.test(process.argv[1])) { //Prepare call const imports = await import("../../app/metrics/utils.mjs") const results = {total:0, lines:{}, stats:{}} - console.debug = () => null + console.debug = log => /exited with code null/.test(log) ? console.error(log.replace(/^.*--max-count=(?\d+) --skip=(?\d+).*$/, (_, step, start) => `error: skipped commits ${start} from ${Number(start)+Number(step)}`)) : null //Analyze repository console.log(`commits authoring | ${authoring}\nrepository path | ${path}\n`)