Skip to content

Commit 934bc8d

Browse files
Fixed issue with either or not being included in the GitLab api response. Fixes #55
1 parent de468ea commit 934bc8d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
- Fixed issue with GitLab sub-projects not being included recursively. ([#54](https://github.com/sourcebot-dev/sourcebot/pull/54))
1717
- Fixed slow rendering performance when rendering a large number of results. ([#52](https://github.com/sourcebot-dev/sourcebot/pull/52))
18+
- Fixed issue with either `star_count` or `fork_count` not being included in the GitLab api response. ([#55](https://github.com/sourcebot-dev/sourcebot/issues/55))
1819

1920
## [2.1.1] - 2024-10-25
2021

packages/backend/src/gitlab.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ export const getGitLabReposFromConfig = async (config: GitLabConfig, ctx: AppCon
8484
'zoekt.web-url-type': 'gitlab',
8585
'zoekt.web-url': project.web_url,
8686
'zoekt.name': repoId,
87-
'zoekt.gitlab-stars': project.star_count.toString(),
88-
'zoekt.gitlab-forks': project.forks_count.toString(),
87+
'zoekt.gitlab-stars': project.star_count?.toString() ?? '0',
88+
'zoekt.gitlab-forks': project.forks_count?.toString() ?? '0',
8989
'zoekt.archived': marshalBool(project.archived),
9090
'zoekt.fork': marshalBool(isFork),
9191
'zoekt.public': marshalBool(project.visibility === 'public'),

0 commit comments

Comments
 (0)