Restore compatibility with GHES 3.1

This commit is contained in:
Chuan-kai Lin
2022-03-14 08:20:27 -07:00
parent 761da7eb50
commit aeefdce612
19 changed files with 149 additions and 37 deletions

View File

@@ -594,6 +594,16 @@ export function isHTTPError(arg: any): arg is HTTPError {
return arg?.status !== undefined && Number.isInteger(arg.status);
}
export function isGitHubGhesVersionBelow(
gitHubVersion: GitHubVersion,
expectedVersion: string
): boolean {
return (
gitHubVersion.type === GitHubVariant.GHES &&
semver.lt(gitHubVersion.version, expectedVersion)
);
}
export async function codeQlVersionAbove(
codeql: CodeQL,
requiredVersion: string