We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d8facfa + d76d110 commit fed414fCopy full SHA for fed414f
src/configuration/configuration.ts
@@ -71,7 +71,15 @@ export function useEnterprise(): boolean {
71
export function getGitHubApiUri(): string {
72
if (!useEnterprise()) return DEFAULT_GITHUB_API;
73
const base = getConfiguration().get<string>("github-enterprise.uri", DEFAULT_GITHUB_API).replace(/\/$/, "");
74
- return base === DEFAULT_GITHUB_API ? base : `${base}/api/v3`;
+ if (base === DEFAULT_GITHUB_API) {
75
+ return base;
76
+ }
77
+
78
+ if (base.endsWith(".ghe.com")) {
79
+ return `api.${base}`;
80
+ } else {
81
+ return `${base}/api/v3`;
82
83
}
84
85
async function updateLanguageServerApiUrl(context: vscode.ExtensionContext) {
0 commit comments