mirror of
https://github.com/github/codeql-action.git
synced 2026-01-02 04:30:14 +08:00
Restore compatibility with GHES 3.1
This commit is contained in:
10
src/util.ts
10
src/util.ts
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user