Fix habits and stargazers plugin, add repositories_affiliations options and metadata updates (#117)
This commit is contained in:
@@ -100,7 +100,7 @@
|
||||
console.debug(`metrics/compute/${login}/plugins > habits > running linguist`)
|
||||
;(await imports.run(`${prefix} github-linguist --breakdown`, {cwd:path}))
|
||||
//Parse linguist result
|
||||
.split("\n").map(line => line.match(/(?<value>[\d.]+)%\s+(?<language>\w+)/)?.groups).filter(line => line)
|
||||
.split("\n").map(line => line.match(/(?<value>[\d.]+)%\s+(?<language>[\s\S]+)$/)?.groups).filter(line => line)
|
||||
.map(({value, language}) => habits.linguist.languages[language] = (habits.linguist.languages[language] ?? 0) + value/100)
|
||||
habits.linguist.ordered = Object.entries(habits.linguist.languages).sort(([_an, a], [_bn, b]) => b - a)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
name: "💡 Coding habits"
|
||||
cost: 1 REST request per 100 events + 1 REST request pet commit
|
||||
categorie: github
|
||||
supports:
|
||||
- user
|
||||
- organization
|
||||
|
||||
Reference in New Issue
Block a user