fix(web) Fix "At least one project, user, or group must be specified" for GitLab configs in web configurator (#512)

This commit is contained in:
Brendan Kellam 2025-09-17 12:23:11 -07:00 committed by GitHub
parent 83a8d306db
commit b217fbe07d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Fixed
- Fixed "At least one project, user, or group must be specified" for GitLab configs with `all` in web configurator. [#512](https://github.com/sourcebot-dev/sourcebot/pull/512)
## [4.6.8] - 2025-09-15 ## [4.6.8] - 2025-09-15
### Fixed ### Fixed

View file

@ -13,8 +13,9 @@ const additionalConfigValidation = (config: GitlabConnectionConfig): { message:
const hasProjects = config.projects && config.projects.length > 0 && config.projects.some(p => p.trim().length > 0); const hasProjects = config.projects && config.projects.length > 0 && config.projects.some(p => p.trim().length > 0);
const hasUsers = config.users && config.users.length > 0 && config.users.some(u => u.trim().length > 0); const hasUsers = config.users && config.users.length > 0 && config.users.some(u => u.trim().length > 0);
const hasGroups = config.groups && config.groups.length > 0 && config.groups.some(g => g.trim().length > 0); const hasGroups = config.groups && config.groups.length > 0 && config.groups.some(g => g.trim().length > 0);
const hasAll = config.all;
if (!hasProjects && !hasUsers && !hasGroups) { if (!hasProjects && !hasUsers && !hasGroups && !hasAll) {
return { return {
message: "At least one project, user, or group must be specified", message: "At least one project, user, or group must be specified",
isValid: false, isValid: false,