Skip to content

Sync all GitLab repos visible to the token #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
loris opened this issue Oct 25, 2024 · 2 comments · Fixed by #84
Closed

Sync all GitLab repos visible to the token #49

loris opened this issue Oct 25, 2024 · 2 comments · Fixed by #84
Labels
enhancement New feature or request

Comments

@loris
Copy link

loris commented Oct 25, 2024

Not sure if a bug report or a feature request, but it looks like v2 does not allow to sync all the repositories of a GitLab server which are visible to the user who created the token.

According to the documentation it should be possible using groups: "List of groups to sync with. All projects in the group visible to the provided token (if any) will be synced.". However this is not how it works because of the hardcoded owned=true query parameter:

const { durationMs, data } = await measure(() => api.Groups.allProjects(group, {
perPage: 100,
owned: true,
}));

In addition to that owned=true query parameter which should be removed IMO, we should probably allow syncing all the projects of a gitlab server when neither groups or users or projects are defined (using api.Projects.all())

Currently, the only workaround to sync all the visible repos seems to explicitly list them all in the projects property

@brendan-kellam brendan-kellam added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request bug Something isn't working labels Oct 25, 2024
@brendan-kellam
Copy link
Contributor

brendan-kellam commented Oct 25, 2024

thanks for raising! Yea I think the owned=true was a oversight on my part since I was always testing with projects that I owned. Fix for that incoming in #50. Update: Fixed in release v2.1.1

I will keep this issue open for the suggestion about syncing all projects visible to a token.

@Jellyfrog
Copy link
Contributor

include_subgroups option is missing, in v1 I didn't need to specify anything, in v2 I need to specify every single group I want indexed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants