-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Feature Request: Add Support for GitLab Nested Groups/Subgroups
Summary
Context7's GitLab integration currently only supports repositories at the top level of a group (e.g., https://gitlab.com/owner/repo). It does not support repositories nested within subgroups, which is a common organisational pattern on GitLab.
Problem Description
When attempting to add a GitLab repository that exists within a subgroup, Context7 returns an error:
- URL attempted:
https://gitlab.com/astra-language/astra-tools/astra-activemq - Error received: "Please enter a valid GitLab repository URL"
This repository is valid and publicly accessible on GitLab, but the URL contains three path segments (astra-language/astra-tools/astra-activemq) rather than the two segments (owner/repo) that Context7 currently expects.
Additionally, when attempting to add a subgroup URL directly (e.g., https://gitlab.com/astra-language/astra-tools), the error "The repository is not found or access denied" is returned, as Context7 attempts to treat the subgroup as a repository.
GitLab's Group Structure
GitLab supports nested groups (subgroups) to help organise related projects. For example:
astra-language/ ← Top-level group
├── astra-core ← Repository (works with Context7 ✓)
├── astra-tools/ ← Subgroup
│ ├── astra-activemq ← Repository (does NOT work ✗)
│ ├── astra-bspl ← Repository (does NOT work ✗)
│ └── astra-langchain4j ← Repository (does NOT work ✗)
└── Examples/ ← Subgroup
└── astra-guides ← Repository (does NOT work ✗)
Expected Behaviour
Context7 should accept GitLab repository URLs with any number of path segments, as GitLab allows unlimited nesting depth. Valid URL patterns include:
https://gitlab.com/owner/repo(2 segments)https://gitlab.com/owner/subgroup/repo(3 segments)https://gitlab.com/owner/subgroup1/subgroup2/repo(4+ segments)
Technical Notes
- GitLab's API handles nested paths using URL encoding: the project path
astra-language/astra-tools/astra-activemqbecomesastra-language%2Fastra-tools%2Fastra-activemqin API calls - The GitLab API endpoint would be:
https://gitlab.com/api/v4/projects/astra-language%2Fastra-tools%2Fastra-activemq - This is a well-documented GitLab feature: https://docs.gitlab.com/ee/user/group/subgroups/
Impact
Many organisations use subgroups to organise their repositories by team, project type, or domain. Without support for nested groups, a significant portion of GitLab's public repositories cannot be added to Context7.
Example Repositories That Cannot Be Added
https://gitlab.com/astra-language/astra-tools/astra-activemqhttps://gitlab.com/astra-language/astra-tools/astra-bsplhttps://gitlab.com/astra-language/astra-tools/astra-langchain4jhttps://gitlab.com/astra-language/examples/astra-guides
All of these are valid, public GitLab repositories that would benefit from being indexed by Context7.
Thank you for considering this enhancement.