mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
[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:
parent
3697f3da7f
commit
8019f316a7
4 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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[];
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue