mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 12:25:22 +00:00
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:
parent
29b5bde48e
commit
c03cbc35c7
2 changed files with 5 additions and 1 deletions
|
|
@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [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
|
||||
|
||||
### Fixed
|
||||
|
|
|
|||
|
|
@ -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 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 hasAll = config.all;
|
||||
|
||||
if (!hasProjects && !hasUsers && !hasGroups) {
|
||||
if (!hasProjects && !hasUsers && !hasGroups && !hasAll) {
|
||||
return {
|
||||
message: "At least one project, user, or group must be specified",
|
||||
isValid: false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue