From 3946bb9016bdaffd6fe9400f95f5d6a8040de4aa Mon Sep 17 00:00:00 2001 From: Brian Muenzenmeyer Date: Mon, 12 May 2025 14:20:19 -0500 Subject: [PATCH] fix(repository): Handle missing projects (classic) data fixes https://github.com/github-community-projects/org-metrics-dashboard/issues/217 --- backend/src/fetchers/repository.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/src/fetchers/repository.ts b/backend/src/fetchers/repository.ts index 226af117..931c1c90 100644 --- a/backend/src/fetchers/repository.ts +++ b/backend/src/fetchers/repository.ts @@ -31,9 +31,6 @@ export const addRepositoriesToResult: Fetcher = async ( hasIssuesEnabled hasProjectsEnabled hasDiscussionsEnabled - projects { - totalCount - } projectsV2 { totalCount } @@ -92,7 +89,7 @@ export const addRepositoriesToResult: Fetcher = async ( projectsEnabled: repo.hasProjectsEnabled, discussionsEnabled: repo.hasDiscussionsEnabled, collaboratorsCount: repo.collaborators?.totalCount || 0, - projectsCount: repo.projects.totalCount, + projectsCount: repo.projects?.totalCount || 0, projectsV2Count: repo.projectsV2.totalCount, } as RepositoryResult, };