Add detection for GitHub AE.
This commit is contained in:
parent
781e3bc540
commit
0656b2c1ad
10 changed files with 27 additions and 6 deletions
|
|
@ -221,6 +221,7 @@ let hasBeenWarnedAboutVersion = false;
|
|||
|
||||
export type GitHubVersion =
|
||||
| { type: "dotcom" }
|
||||
| { type: "ghae" }
|
||||
| { type: "ghes"; version: string };
|
||||
|
||||
export async function getGitHubVersion(
|
||||
|
|
@ -242,6 +243,10 @@ export async function getGitHubVersion(
|
|||
return { type: "dotcom" };
|
||||
}
|
||||
|
||||
if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === "GitHub AE") {
|
||||
return { type: "ghae" };
|
||||
}
|
||||
|
||||
const version = response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] as string;
|
||||
return { type: "ghes", version };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue