Skip to content

Commit 3946bb9

Browse files
fix(repository): Handle missing projects (classic) data
fixes #217
1 parent 2fedffc commit 3946bb9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

backend/src/fetchers/repository.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ export const addRepositoriesToResult: Fetcher = async (
3131
hasIssuesEnabled
3232
hasProjectsEnabled
3333
hasDiscussionsEnabled
34-
projects {
35-
totalCount
36-
}
3734
projectsV2 {
3835
totalCount
3936
}
@@ -92,7 +89,7 @@ export const addRepositoriesToResult: Fetcher = async (
9289
projectsEnabled: repo.hasProjectsEnabled,
9390
discussionsEnabled: repo.hasDiscussionsEnabled,
9491
collaboratorsCount: repo.collaborators?.totalCount || 0,
95-
projectsCount: repo.projects.totalCount,
92+
projectsCount: repo.projects?.totalCount || 0,
9693
projectsV2Count: repo.projectsV2.totalCount,
9794
} as RepositoryResult,
9895
};

0 commit comments

Comments
 (0)