fix(github): recognise remotes cloned through ssh.github.com (#3391)

A clone over GitHub's SSH-over-HTTPS host (ssh://[email protected]:443/o/r.git or [email protected]:o/r.git) wasn't recognised as a GitHub repository. parseGitHubRemote now accepts ssh.github.com for SSH remotes; https://ssh.github.com stays rejected. Sibling of #3379.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-14 22:57:59 +08:00
1 джерело 13e18af777
коміт 41b581eafd
2 files changed
+5 -2

No files matched your search

+3
Переглянути файл
@@ -401,6 +401,9 @@ describe("pull request helpers", () => {
"ssh://[email protected]/o/r.git",
"ssh://[email protected]:22/o/r.git",
"git://github.com/o/r",
// GitHub's SSH-over-HTTPS host.
"ssh://[email protected]:443/o/r.git",
"[email protected]:o/r.git",
])
expect(parseGitHubRemote(url), url).toEqual({ owner: "o", name: "r" });
expect(parseGitHubRemote("https://gitlab.com/o/r.git")).toBeNull();