diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b7d966..f432b08e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/packages/backend/src/gitlab.ts b/packages/backend/src/gitlab.ts index 18ffd8ba..23d7a9ac 100644 --- a/packages/backend/src/gitlab.ts +++ b/packages/backend/src/gitlab.ts @@ -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; diff --git a/packages/backend/src/schemas/v2.ts b/packages/backend/src/schemas/v2.ts index a5dcd6f1..df6f943f 100644 --- a/packages/backend/src/schemas/v2.ts +++ b/packages/backend/src/schemas/v2.ts @@ -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[]; /** diff --git a/schemas/v2/index.json b/schemas/v2/index.json index ae02774f..42ec053c 100644 --- a/schemas/v2/index.json +++ b/schemas/v2/index.json @@ -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",