Repository navigation
Description
Operating system
macOS (arm64)
Orca version
Source checkout at 575d3b2cf6133747dbd3191915ef1e41d3577a98 (package version 1.4.214).
Details
A GitLab.com remote using ssh://[email protected]:443/team/project.git is not recognized as GitLab by the project parser or source-control link parser. When a GitLab provider hint is supplied, the manual merge-request URL uses https://altssh.gitlab.com/... instead of https://gitlab.com/.... GitLab documents altssh.gitlab.com:443 as its alternative SSH endpoint; it is a transport address, not the web/API host.
Reproduced offline against the production functions on the commit above. From the repository root, run with Bun:
bun -e '
import { parseGitLabProjectRef } from "./src/main/gitlab/project-ref-parser.ts";
import { parseHostedRemote } from "./src/main/git/hosted-remote-url.ts";
import { parseRemoteRepo } from "./src/renderer/src/components/right-sidebar/source-control/review/remote-repo.ts";
import { buildSourceControlManualReviewUrl } from "./src/renderer/src/components/right-sidebar/source-control/review/manual-review-url.ts";
const remote = "ssh://[email protected]:443/team/project.git";
console.log(parseGitLabProjectRef(remote));
console.log(parseHostedRemote(remote));
console.log(parseRemoteRepo(remote));
console.log(buildSourceControlManualReviewUrl({baseRef:"main", branchName:"feature", repoRemoteName:"origin", repoRemoteUrl:remote, provider:"gitlab", upstreamName:"origin/feature"}));
'Actual results:
parseGitLabProjectRefandparseHostedRemotereturnnull.parseRemoteReporeturns providernulland web basehttps://altssh.gitlab.com/team/project.- The manual MR URL starts with
https://altssh.gitlab.com/team/project/-/merge_requests/new.
Expected: recognize GitLab.com and use https://gitlab.com/team/project for web links, while retaining the SSH remote for Git operations. The same project-parser call with ssh://[email protected]/team/project.git correctly returns {host:"gitlab.com", path:"team/project"}.
The shared normalizeGitLabRemoteHost() already knows this alias, but these parsing paths do not use it. This is distinct from #10154 (custom HTTP schemes on self-hosted GitLab) and #30783/#30808 (Bitbucket's SSH alias). No fix is included here.
Validation is limited to production-function reproduction on macOS; no live GitLab request, GUI session, Windows, Linux, or remote SSH session was exercised. A workaround is to retain gitlab.com in the remote URL and select altssh.gitlab.com/port 443 through the user's SSH config.
Activity
fix(gitlab): canonicalize SSH-over-443 project and review URLs
fix(gitlab): recognize SSH-over-443 remotes (stablyai#30998)