Fix parsing of GHES pre-release versions

This commit is contained in:
Koen Vlaswinkel
2025-07-14 11:25:20 +02:00
parent bcdb4ecb96
commit dd627a9af6
9 changed files with 70 additions and 11 deletions
+2 -2
View File
@@ -138,7 +138,7 @@ function areAllRunsUnique(sarifObjects) {
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, githubVersion) {
// Do not show this warning on GHES versions before 3.14.0
if (githubVersion.type === util_1.GitHubVariant.GHES &&
semver.lt(githubVersion.version, "3.14.0")) {
semver.lt((0, util_1.parseGhesVersion)(githubVersion.version), "3.14.0")) {
return false;
}
// Only give a deprecation warning when not all runs are unique and
@@ -158,7 +158,7 @@ async function throwIfCombineSarifFilesDisabled(sarifObjects, features, githubVe
async function shouldDisableCombineSarifFiles(sarifObjects, features, githubVersion) {
if (githubVersion.type === util_1.GitHubVariant.GHES) {
// Never block on GHES versions before 3.18.
if (semver.lt(githubVersion.version, "3.18.0-0")) {
if (semver.lt((0, util_1.parseGhesVersion)(githubVersion.version), "3.18.0-0")) {
return false;
}
}