This commit is contained in:
@@ -154,6 +154,7 @@ async function analyze({login, imports, data}, {results, path, categories = ["pr
|
||||
let empty = true, file = null, lang = null
|
||||
await imports.spawn("git", ["log", ...data.shared["commits.authoring"].map(authoring => `--author="${authoring}"`), "--regexp-ignore-case", "--format=short", "--patch", `--max-count=${per_page}`, `--skip=${page*per_page}`], {cwd:path}, {
|
||||
stdout(line) {
|
||||
try {
|
||||
//Unflag empty output
|
||||
if ((empty)&&(line.trim().length))
|
||||
empty = false
|
||||
@@ -168,8 +169,8 @@ async function analyze({login, imports, data}, {results, path, categories = ["pr
|
||||
//File marker
|
||||
if (/^[+]{3}\sb[/](?<file>[\s\S]+)$/.test(line)) {
|
||||
file = `${path}/${line.match(/^[+]{3}\sb[/](?<file>[\s\S]+)$/)?.groups?.file}`.replace(/\\/g, "/")
|
||||
lang = files[file]
|
||||
if (!categories.includes(languageResults[lang].type))
|
||||
lang = files[file] ?? null
|
||||
if ((lang)&&(!categories.includes(languageResults[lang].type)))
|
||||
lang = null
|
||||
edited.add(file)
|
||||
return
|
||||
@@ -185,6 +186,10 @@ async function analyze({login, imports, data}, {results, path, categories = ["pr
|
||||
results.total += size
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
console.debug(`metrics/compute/${login}/plugins > languages > indepth > an error occured while processing line (${error.message}), skipping...`)
|
||||
}
|
||||
}
|
||||
})
|
||||
if (empty) {
|
||||
console.debug(`metrics/compute/${login}/plugins > languages > indepth > no more commits`)
|
||||
|
||||
Reference in New Issue
Block a user