use-github-pat.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. diff --git a/extensions/github-authentication/src/common/env.ts b/extensions/github-authentication/src/common/env.ts
  2. index ebc4749..18fd732 100644
  3. --- a/extensions/github-authentication/src/common/env.ts
  4. +++ b/extensions/github-authentication/src/common/env.ts
  5. @@ -7,21 +7,4 @@ import { AuthProviderType } from '../github';
  6. -const VALID_DESKTOP_CALLBACK_SCHEMES = [
  7. - 'vscode',
  8. - 'vscode-insiders',
  9. - // On Windows, some browsers don't seem to redirect back to OSS properly.
  10. - // As a result, you get stuck in the auth flow. We exclude this from the
  11. - // list until we can figure out a way to fix this behavior in browsers.
  12. - // 'code-oss',
  13. - 'vscode-wsl',
  14. - 'vscode-exploration'
  15. -];
  16. -
  17. -export function isSupportedClient(uri: Uri): boolean {
  18. - return (
  19. - VALID_DESKTOP_CALLBACK_SCHEMES.includes(uri.scheme) ||
  20. - // vscode.dev & insiders.vscode.dev
  21. - /(?:^|\.)vscode\.dev$/.test(uri.authority) ||
  22. - // github.dev & codespaces
  23. - /(?:^|\.)github\.dev$/.test(uri.authority)
  24. - );
  25. +export function isSupportedClient(_uri: Uri): boolean {
  26. + return false;
  27. }
  28. @@ -35,4 +18,4 @@ export function isSupportedTarget(type: AuthProviderType, gheUri?: Uri): boolean
  29. -export function isHostedGitHubEnterprise(uri: Uri): boolean {
  30. - return /\.ghe\.com$/.test(uri.authority);
  31. +export function isHostedGitHubEnterprise(_uri: Uri): boolean {
  32. + return false;
  33. }
  34. diff --git a/src/vs/workbench/services/authentication/browser/authenticationService.ts b/src/vs/workbench/services/authentication/browser/authenticationService.ts
  35. index 7ad8444..6020185 100644
  36. --- a/src/vs/workbench/services/authentication/browser/authenticationService.ts
  37. +++ b/src/vs/workbench/services/authentication/browser/authenticationService.ts
  38. @@ -279,12 +279,2 @@ export class AuthenticationService extends Disposable implements IAuthentication
  39. }
  40. -
  41. - if (!this._authenticationProviders.size) {
  42. - placeholderMenuItem = MenuRegistry.appendMenuItem(MenuId.AccountsContext, {
  43. - command: {
  44. - id: 'noAuthenticationProviders',
  45. - title: nls.localize('loading', "Loading..."),
  46. - precondition: ContextKeyExpr.false()
  47. - },
  48. - });
  49. - }
  50. }