fix(plugins/notable): plugin_notable_repositories not applied when plugin_notable_from: all (#679) [skip ci]
This commit is contained in:
@@ -72,11 +72,9 @@ export default async function({login, q, imports, rest, graphql, data, account,
|
||||
}
|
||||
|
||||
//Aggregate contributions
|
||||
if (from !== "all") {
|
||||
console.debug(`metrics/compute/${login}/plugins > notable > aggregating results`)
|
||||
contributions = contributions.filter(({organization}) => (from === "organization")&&(organization))
|
||||
const aggregated = new Map()
|
||||
for (const {name, handle, avatar, organization, stars, ..._extras} of contributions) {
|
||||
for (const {name, handle, avatar, organization = handle.split("/").shift() ?? "", stars, ..._extras} of contributions) {
|
||||
const key = repositories ? handle : name
|
||||
if (aggregated.has(key)) {
|
||||
const aggregate = aggregated.get(key)
|
||||
@@ -101,7 +99,6 @@ export default async function({login, q, imports, rest, graphql, data, account,
|
||||
//Sort contribution by maintainer first and then by contribution percentage
|
||||
contributions = contributions.sort((a, b) => ((b.user?.percentage + b.user?.maintainer) || 0) - ((a.user?.percentage + a.user?.maintainer) || 0))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Results
|
||||
|
||||
Reference in New Issue
Block a user