Fix duplicated contributors (#254)

This commit is contained in:
Eric Fennis
2021-03-07 20:57:28 +01:00
committed by GitHub
parent 103d4aa3a4
commit 1513f61522

View File

@@ -53,7 +53,8 @@ export const filterCommits = (commits) =>
.map(({ sha, author, commit }) => ({
author: author && author.login ? author.login : null,
commit: sha,
}));
}))
.filter(({ author }, index, self) => self.findIndex((commit) => commit.author === author) === index);
const getIconHash = async (icon) => await getContentHashOfFile(path.join(process.cwd(), "../icons", `${icon}.svg`))
const iconCacheDir = path.join(process.cwd(),'.next/cache/github-api');