[PR #36] [MERGED] fix(connectors/gitlab): resolve subgroup path parsing dynamically #89

Closed
opened 2026-10-18 21:14:16 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/oikb/pull/36
Author: @mhajder
Created: 6/6/2026
Status: ✅ Merged
Merged: 7/17/2026
Merged by: @tjbck

Base: main ← Head: fix/connectors/gitlab


📝 Commits (1)

  • ae4869e fix(connectors/gitlab): resolve subgroup path parsing dynamically

📊 Changes

1 file changed (+74 additions, -20 deletions)

View changed files

📝 src/oikb/connectors/gitlab.py (+74 -20)

📄 Description

Previously, GitLab source parser used a simple split limit to extract the owner namespace and repository name (e.g. source.split("/", 2)). This caused parsing failures for repositories located in nested subgroups (e.g., gitlab:group/subgroup/project/docs/api), as the subgroup path would get incorrectly split.

This PR fixes subgroup parsing by:

  1. Supporting an explicit project:path separator format (e.g., gitlab:group/subgroup/project:docs/api) in parse_gitlab_source.
  2. Adding a lazy resolution helper _ensure_resolved() to the connector. It probes the segments against the GitLab API (/projects/{candidate}) to dynamically identify the boundary between the project path and the repository file path.
  3. Merging paths safely and falling back to the default split behavior if the API check fails or the client is offline.

Should fix #14


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/oikb/pull/36 **Author:** [@mhajder](https://github.com/mhajder) **Created:** 6/6/2026 **Status:** ✅ Merged **Merged:** 7/17/2026 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `main` ← **Head:** `fix/connectors/gitlab` --- ### 📝 Commits (1) - [`ae4869e`](https://github.com/open-webui/oikb/commit/ae4869e249bfcc5bc1d49e19d847324c17e3d6ed) fix(connectors/gitlab): resolve subgroup path parsing dynamically ### 📊 Changes **1 file changed** (+74 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `src/oikb/connectors/gitlab.py` (+74 -20) </details> ### 📄 Description Previously, GitLab source parser used a simple split limit to extract the owner namespace and repository name (e.g. `source.split("/", 2)`). This caused parsing failures for repositories located in nested subgroups (e.g., `gitlab:group/subgroup/project/docs/api`), as the subgroup path would get incorrectly split. This PR fixes subgroup parsing by: 1. Supporting an explicit `project:path` separator format (e.g., `gitlab:group/subgroup/project:docs/api`) in `parse_gitlab_source`. 2. Adding a lazy resolution helper `_ensure_resolved()` to the connector. It probes the segments against the GitLab API (`/projects/{candidate}`) to dynamically identify the boundary between the project path and the repository file path. 3. Merging paths safely and falling back to the default split behavior if the API check fails or the client is offline. Should fix #14 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-18 21:14:16 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/oikb#89
No description provided.