Skip to content

Commit

Permalink
Merge pull request #396 from github/proxima-fix
Browse files Browse the repository at this point in the history
Update api/v3 postfix to api. prefix
  • Loading branch information
felipesu19 authored Sep 24, 2024
2 parents d8facfa + d76d110 commit fed414f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/configuration/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,15 @@ export function useEnterprise(): boolean {
export function getGitHubApiUri(): string {
if (!useEnterprise()) return DEFAULT_GITHUB_API;
const base = getConfiguration().get<string>("github-enterprise.uri", DEFAULT_GITHUB_API).replace(/\/$/, "");
return base === DEFAULT_GITHUB_API ? base : `${base}/api/v3`;
if (base === DEFAULT_GITHUB_API) {
return base;
}

if (base.endsWith(".ghe.com")) {
return `api.${base}`;
} else {
return `${base}/api/v3`;
}
}

async function updateLanguageServerApiUrl(context: vscode.ExtensionContext) {
Expand Down

0 comments on commit fed414f

Please sign in to comment.