-
Notifications
You must be signed in to change notification settings - Fork 550
Gitlab SaaS support #6426
Description
Currently, the gitlab source supports self-hosted according to the documentation. It actually works fine with the SaaS option, only problem is it pulls ALL of gitlab which, while reveals interesting information about gitlab, probably isn't ideal behavior.
SaaS support could work by pre-filtering API calls to gitlab.com (bolded is preferred):
- first call /namespaces, grab the IDs of each namespace from the response, then call /groups/:namespaceid:/projects
- /projects?visibility=private would only return a given user's namespace projects. However if a user didn't have private projects, they'd still need to run visibility=public and they'd end up grabbing everything from gitlab again.
- /users/:userid:/projects returns information about a users owned projects, which is not always the case
Alternatively, we could just live with grabbing all of Gitlab.com and filter post-fetch, but that doesn't seem scalable as gitlab grows its public presence and doesn't seem like a "good api citizen" thing to do to Gitlab.
Additional context
spoke briefly with ben about this in discord.
found some issues recently closed, though i don't think the solution helps in this namespace-wide data gathering capability: https://gitlab.com/gitlab-org/gitlab/-/issues/16149