Skip to content

Commit

Permalink
Update update-contributors.js
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSunshyne authored Aug 7, 2023
1 parent f84ef55 commit 71f466b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion update-contributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ const contributorsFile = 'contributors.json';
async function updateContributors() {
try {
const response = await axios.get(`https://api.github.com/repos/${owner}/${repo}/contributors`);
const contributors = response.data.map(contributor => contributor.login);
const contributors = response.data.map(contributor => {
return {
username: contributor.login,
contributions: contributor.contributions
}
});

const updatedContributors = [...new Set(contributors)];

Expand Down

0 comments on commit 71f466b

Please sign in to comment.