Skip to content

Fix group lookup failing on large GitLab instances#3

Merged
nickmarden merged 1 commit into
so-many-slashesfrom
fix-group-search-pagination
Mar 31, 2026
Merged

Fix group lookup failing on large GitLab instances#3
nickmarden merged 1 commit into
so-many-slashesfrom
fix-group-search-pagination

Conversation

@nickmarden

Copy link
Copy Markdown
Owner

Problem

The groups API query used per_page=10000, which GitLab silently caps at 100. On instances with more than 100 groups, the target namespace may not appear in results, causing group_id to stay None and project creation to fall back to the user's personal namespace, producing the error:

You cannot create projects in your personal namespace.

Fix

Add a search= parameter using the leaf component of the namespace (e.g. myaccident from MyAccident, or findlaw-tech from findlaw/findlaw-tech). This filters server-side so pagination is never an issue. The existing full_path comparison then disambiguates if multiple groups share the same leaf name.

The groups API query used per_page=10000, which GitLab silently caps
at 100. On instances with more than 100 groups, the target namespace
may not appear in results, causing group_id to stay None and project
creation to fall back to the user's personal namespace.

Fix: add search= parameter using the leaf component of the namespace
so the API filters server-side, making pagination irrelevant.
@nickmarden
nickmarden merged commit 85c9472 into so-many-slashes Mar 31, 2026
@nickmarden
nickmarden deleted the fix-group-search-pagination branch March 31, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant