Add detection for GitHub AE.

This commit is contained in:
Chris Gavin 2021-02-13 11:06:03 +00:00
parent 781e3bc540
commit 0656b2c1ad
No known key found for this signature in database
GPG key ID: 07F950B80C27E4DA
10 changed files with 27 additions and 6 deletions

3
lib/util.js generated
View file

@ -211,6 +211,9 @@ async function getGitHubVersion(apiDetails) {
if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === undefined) {
return { type: "dotcom" };
}
if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === "GitHub AE") {
return { type: "ghae" };
}
const version = response.headers[GITHUB_ENTERPRISE_VERSION_HEADER];
return { type: "ghes", version };
}