Skip to content

Commit 8019f31

Browse files
[Fix] Change GitLab syncing behaviour for groups and users to include projects that are _not_ owned by the token (#51)
1 parent 3697f3d commit 8019f31

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- 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))
13+
1014
## [2.1.0] - 2024-10-22
1115

1216
### Added

packages/backend/src/gitlab.ts

-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export const getGitLabReposFromConfig = async (config: GitLabConfig, ctx: AppCon
2525
logger.debug(`Fetching project info for group ${group}...`);
2626
const { durationMs, data } = await measure(() => api.Groups.allProjects(group, {
2727
perPage: 100,
28-
owned: true,
2928
}));
3029
logger.debug(`Found ${data.length} projects in group ${group} in ${durationMs}ms.`);
3130

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

packages/backend/src/schemas/v2.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export interface GitLabConfig {
8080
*/
8181
url?: string;
8282
/**
83-
* List of users to sync with. All personal projects that the user owns will be synced, unless explicitly defined in the `exclude` property.
83+
* 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.
8484
*/
8585
users?: string[];
8686
/**

schemas/v2/index.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
"items": {
152152
"type": "string"
153153
},
154-
"description": "List of users to sync with. All personal projects that the user owns will be synced, unless explicitly defined in the `exclude` property."
154+
"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."
155155
},
156156
"groups": {
157157
"type": "array",

0 commit comments

Comments
 (0)