Opening a gist repository gives a fetch error by burkeholland · Pull Request #2933 · microsoft/vscode-pull-request-github (original) (raw)
This works for me for both git@github.com
and git@gist.github.com
, while keeping functionality for non-gist repos:
diff --git a/src/authentication/githubServer.ts b/src/authentication/githubServer.ts index a3859d4..dc87dc0 100644 --- a/src/authentication/githubServer.ts +++ b/src/authentication/githubServer.ts @@ -17,6 +17,11 @@ export class GitHubManager { return false; }
// gist repos are not supported
if (host.authority === 'gist.github.com' || /^\/[a-z0-9]+$/i.test(host.path)) {
return false;
}
if (this._servers.has(host.authority)) { return !!this._servers.get(host.authority); }
EDIT: summary of what it works on:
git@gist.github.com:gist-id
git@github.com:gist-id
https://gist.github.com/gist-id
https://gist.github.com/user/gist-id
I'm unaware if https://github.com/id
is a valid normal repository remote URL, which this patch would break. If it is, removing the regex test part of the condition would work, but then (2) wouldn't be detected as a gist.