Fixed issue with either or not being included in the GitLab api response. Fixes #55

This commit is contained in:
bkellam 2024-10-30 13:27:43 -07:00
parent de468eae5d
commit 934bc8d903
2 changed files with 3 additions and 2 deletions

View file

@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed issue with GitLab sub-projects not being included recursively. ([#54](https://github.com/sourcebot-dev/sourcebot/pull/54)) - Fixed issue with GitLab sub-projects not being included recursively. ([#54](https://github.com/sourcebot-dev/sourcebot/pull/54))
- Fixed slow rendering performance when rendering a large number of results. ([#52](https://github.com/sourcebot-dev/sourcebot/pull/52)) - Fixed slow rendering performance when rendering a large number of results. ([#52](https://github.com/sourcebot-dev/sourcebot/pull/52))
- 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))
## [2.1.1] - 2024-10-25 ## [2.1.1] - 2024-10-25

View file

@ -84,8 +84,8 @@ export const getGitLabReposFromConfig = async (config: GitLabConfig, ctx: AppCon
'zoekt.web-url-type': 'gitlab', 'zoekt.web-url-type': 'gitlab',
'zoekt.web-url': project.web_url, 'zoekt.web-url': project.web_url,
'zoekt.name': repoId, 'zoekt.name': repoId,
'zoekt.gitlab-stars': project.star_count.toString(), 'zoekt.gitlab-stars': project.star_count?.toString() ?? '0',
'zoekt.gitlab-forks': project.forks_count.toString(), 'zoekt.gitlab-forks': project.forks_count?.toString() ?? '0',
'zoekt.archived': marshalBool(project.archived), 'zoekt.archived': marshalBool(project.archived),
'zoekt.fork': marshalBool(isFork), 'zoekt.fork': marshalBool(isFork),
'zoekt.public': marshalBool(project.visibility === 'public'), 'zoekt.public': marshalBool(project.visibility === 'public'),