From a23b2845730eb06fd2754910bf157f625939655d Mon Sep 17 00:00:00 2001 From: Seth Etter Date: Wed, 25 Oct 2023 08:46:42 -0500 Subject: [PATCH] fix a bad merge --- lib/github.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/github.ts b/lib/github.ts index b9734f5..7b7a079 100644 --- a/lib/github.ts +++ b/lib/github.ts @@ -81,17 +81,6 @@ export async function fetchGitHubContributors(token: string, repos: string[]) { const allContributors: IContributor[] = []; const contributorsMap = new Map(); - for (const repo of repos) { - const response = await fetch(`https://api.github.com/repos/${repo}/contributors`, { - headers: { - Authorization: `token ${token}`, - Accept: 'application/vnd.github.v3+json', - }, - }); - - if (!response.ok) { - throw new Error(`GitHub API request failed with status ${response.status}`); - } let contributors = await Promise.all( repos.map(async (repo) => { const response = await fetch( @@ -128,8 +117,7 @@ export async function fetchGitHubContributors(token: string, repos: string[]) { } } - allContributors.push(...contributorsMap.values()); return allContributors; -} \ No newline at end of file +} -- 2.51.2