Problem#
A GitCafe checkout whose remote uses git's scp-like form with a leading slash, such as ssh@git.cafe:/team/project.git, is recognized as GitCafe but never resolves to a repository. git clone documents this spelling as [<user>@]<host>:/<path-to-git-repo>. parseGitCafeRemote keeps the slash in the path, so the strict owner/name check rejects /team/project and returns null. Pull request lookups for that checkout then fail with "No GitCafe repository remote was found."
Change#
The SCP pattern in gitCafeHosts.ts now skips one optional / after the colon. The core repositoryPathFromRemoteUrl already does the same (#44007). gitCafeRepositoryPath stays strict, because the pull request provider uses it as an exact owner/name check.
Scope#
Small fix of an obvious bug, so no issue. One line in packages/source-control-gitcafe, plus three test rows. Other remote shapes are out of scope.
Verification#
gitCafeHosts.test.ts gains ssh@git.cafe:/team/project.git and git.cafe:/team/project.git. On main both fail (expected null to deeply equal { host: 'git.cafe', … }). A third row keeps git.cafe://team/project.git rejected, since only one slash is skipped. With the change all 13 tests pass.
- I ran a real-repo check: a fresh
git init with origin set to ssh@git.cafe:/team/project.git. GitCafeSourceControlProvider.listChangeRequests read that remote through real git config, with a recording HTTP client standing in for git.cafe:
| Remote | main | this PR |
|---|
ssh@git.cafe:team/project.git (control) | team/project, requests /api/repos/team/project/pulls | same |
ssh@git.cafe:/team/project.git | null, "No GitCafe repository remote was found.", no request | team/project, requests /api/repos/team/project/pulls |
vp run check:changed passes.
- Not checked: git.cafe's own SSH server with this spelling, since that needs a registered key.
Generated with Gemini 4 Neon in T3 Code Nightly
Evidence#
Real web app, 1280×800, light theme, fresh isolated databases and Replay (dev), using the real GitCafe repository/API.
On each commit, fetch versecafe/webls over HTTPS, check out
from_string()with its upstream configured, set origin tossh@git.cafe:/versecafe/webls.git, create and open a thread, and inspect Version Control.No GitCafe repository remote was found.webls v2, and PR badge appear.Scenario driver.
scenarios:proveexited 0: failed on base and passed on head. Captures inspected.Not shown: