[Fix] Change GitLab syncing behaviour for groups and users to include projects that are _not_ owned by the token (#51)

This commit is contained in:
Brendan Kellam 2024-10-25 12:01:01 -07:00 committed by GitHub
parent 3697f3da7f
commit 8019f316a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 4 deletions

View file

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- Fixed issue with GitLab projects that are not owned but still visible by the provided `token` _not_ being synchronized. ([#51](https://github.com/sourcebot-dev/sourcebot/pull/51))
## [2.1.0] - 2024-10-22
### Added

View file

@ -25,7 +25,6 @@ export const getGitLabReposFromConfig = async (config: GitLabConfig, ctx: AppCon
logger.debug(`Fetching project info for group ${group}...`);
const { durationMs, data } = await measure(() => api.Groups.allProjects(group, {
perPage: 100,
owned: true,
}));
logger.debug(`Found ${data.length} projects in group ${group} in ${durationMs}ms.`);
@ -40,7 +39,6 @@ export const getGitLabReposFromConfig = async (config: GitLabConfig, ctx: AppCon
logger.debug(`Fetching project info for user ${user}...`);
const { durationMs, data } = await measure(() => api.Users.allProjects(user, {
perPage: 100,
owned: true,
}));
logger.debug(`Found ${data.length} projects owned by user ${user} in ${durationMs}ms.`);
return data;

View file

@ -80,7 +80,7 @@ export interface GitLabConfig {
*/
url?: string;
/**
* List of users to sync with. All personal projects that the user owns will be synced, unless explicitly defined in the `exclude` property.
* List of users to sync with. All projects owned by the user and visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property.
*/
users?: string[];
/**

View file

@ -151,7 +151,7 @@
"items": {
"type": "string"
},
"description": "List of users to sync with. All personal projects that the user owns will be synced, unless explicitly defined in the `exclude` property."
"description": "List of users to sync with. All projects owned by the user and visible to the provided `token` (if any) will be synced, unless explicitly defined in the `exclude` property."
},
"groups": {
"type": "array",