fix: apply @Nixinova's code review
This commit is contained in:
@@ -173,8 +173,8 @@ export async function chartist() {
|
||||
/**Language analyzer (single file) */
|
||||
export async function language({filename, patch}) {
|
||||
console.debug(`metrics/language > ${filename}`)
|
||||
const {languages:{results}} = await linguist(filename, {fileContent:patch})
|
||||
const result = (Object.keys(results).shift() ?? "unknown").toLocaleLowerCase()
|
||||
const {files:{results}} = await linguist(filename, {fileContent:patch})
|
||||
const result = (results[filename] ?? "unknown").toLocaleLowerCase()
|
||||
console.debug(`metrics/language > ${filename} > result: ${result}`)
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ inputs:
|
||||
min: 100
|
||||
max: 1000
|
||||
|
||||
plugin_activity_days:
|
||||
plugin_code_days:
|
||||
description: Events maximum age
|
||||
type: number
|
||||
default: 3
|
||||
|
||||
Reference in New Issue
Block a user