Skip to content

fix: support nested group paths in SSH Git URLs#2379

Open
hanhnt2-hblab wants to merge 1 commit into
bmad-code-org:mainfrom
hanhnt2-hblab:fix/ssh-url-nested-group-paths
Open

fix: support nested group paths in SSH Git URLs#2379
hanhnt2-hblab wants to merge 1 commit into
bmad-code-org:mainfrom
hanhnt2-hblab:fix/ssh-url-nested-group-paths

Conversation

@hanhnt2-hblab
Copy link
Copy Markdown

@hanhnt2-hblab hanhnt2-hblab commented May 13, 2026

What

SSH URL parser now accepts nested group paths (e.g. git@host:group/subgroup/repo.git)

Why

GitLab and self-hosted Git servers commonly use nested groups/subgroups in repository paths. The existing regex only matched two-segment owner/repo paths, causing --custom-source to reject valid SSH URLs with "Not a valid Git URL or local path".

How

  • Changed SSH owner capture group from ([^/]+) to (.+?) in parseSource()
  • Repo segment ([^/.]+?) still captures only the final path component
  • cacheKey and displayName naturally extend to include the full owner path

Testing

Verified nested-group SSH URLs (e.g. [email protected]:org/team/project.git) now parse correctly. Standard two-segment URLs ([email protected]:owner/repo.git) continue to work unchanged.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 512ddc07-7572-4da4-ac14-d214be05d74c

📥 Commits

Reviewing files that changed from the base of the PR and between 724867d and c216761.

📒 Files selected for processing (1)
  • tools/installer/modules/custom-module-manager.js

📝 Walkthrough

Walkthrough

The SSH URL parsing regex in parseSource() is updated to capture nested owner/group paths (e.g., git@host:group/subgroup/repo.git). The regex now extracts ownerPath instead of a single owner segment, and the returned cacheKey and displayName are adjusted to reflect the full nested path.

Changes

SSH URL nested path parsing

Layer / File(s) Summary
SSH URL regex and cache key update
tools/installer/modules/custom-module-manager.js
SSH URL parsing regex updated to capture nested ownerPath segments; cacheKey and displayName return values changed from owner/repo format to host/ownerPath/repo and ownerPath/repo to support multi-level owner paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and concisely describes the main change: adding support for nested group paths in SSH Git URLs, which aligns with the changeset's primary objective.
Description check ✅ Passed The description is well-detailed and clearly related to the changeset, explaining what was changed, why it was needed, how it was implemented, and providing testing validation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hanhnt2-hblab hanhnt2-hblab force-pushed the fix/ssh-url-nested-group-paths branch from c216761 to ddeba1e Compare May 13, 2026 06:09
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