maybe final contributions number
This commit is contained in:
parent
be2510d552
commit
7ae6bd52bc
|
@ -12,20 +12,14 @@ const options = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContributors(contributors) {
|
function getContributors(contributors) {
|
||||||
const totalArray = contributors
|
const filtered = contributors
|
||||||
// filter out duplicate contribution objects based on author.login
|
// filter out duplicate contributions based on author.login
|
||||||
.reduce((accumalator, current) => {
|
.filter(
|
||||||
if (
|
(v, i, a) => a.findIndex((t) => t.author.login === v.author.login) === i
|
||||||
!accumalator.some((item) => item.author.login === current.author.login)
|
)
|
||||||
) {
|
.map((item) => item)
|
||||||
accumalator.push(current)
|
|
||||||
}
|
|
||||||
return accumalator
|
|
||||||
}, [])
|
|
||||||
.map((item) => item.total)
|
|
||||||
|
|
||||||
console.log(totalArray)
|
return filtered.length
|
||||||
return arrSum(totalArray)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue