Include CodeQL CLI and action versions in status reports

This commit is contained in:
Chuan-kai Lin
2022-03-17 10:07:29 -07:00
parent d0ee2b4276
commit f60bb5cc38
12 changed files with 124 additions and 17 deletions

View File

@@ -604,6 +604,19 @@ export function isGitHubGhesVersionBelow(
);
}
let cachedCodeQlVersion: undefined | string = undefined;
export function cacheCodeQlVersion(version: string): void {
if (cachedCodeQlVersion !== undefined) {
throw new Error("cacheCodeQlVersion() should be called only once");
}
cachedCodeQlVersion = version;
}
export function getCachedCodeQlVersion(): undefined | string {
return cachedCodeQlVersion;
}
export async function codeQlVersionAbove(
codeql: CodeQL,
requiredVersion: string