mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Use full names for GitHub variants
This commit is contained in:
12
lib/upload-lib.js
generated
12
lib/upload-lib.js
generated
@@ -86355,10 +86355,10 @@ async function getGitHubVersionFromApi(apiClient, apiDetails) {
|
||||
return { type: "GitHub.com" /* DOTCOM */ };
|
||||
}
|
||||
if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === "ghe.com") {
|
||||
return { type: "GHEC-DR" /* GHEC_DR */ };
|
||||
return { type: "GitHub Enterprise Cloud with data residency" /* GHEC_DR */ };
|
||||
}
|
||||
const version = response.headers[GITHUB_ENTERPRISE_VERSION_HEADER];
|
||||
return { type: "GHES" /* GHES */, version };
|
||||
return { type: "GitHub Enterprise Server" /* GHES */, version };
|
||||
}
|
||||
async function getGitHubVersion() {
|
||||
if (cachedGitHubVersion === void 0) {
|
||||
@@ -87977,7 +87977,7 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
toolsVersion: cliVersion2 ?? humanReadableVersion
|
||||
};
|
||||
}
|
||||
if (variant === "GHES" /* GHES */ && !forceShippedTools && !toolsInput) {
|
||||
if (variant === "GitHub Enterprise Server" /* GHES */ && !forceShippedTools && !toolsInput) {
|
||||
const result = await findOverridingToolsInCache(
|
||||
humanReadableVersion,
|
||||
logger
|
||||
@@ -90031,7 +90031,7 @@ function areAllRunsUnique(sarifObjects) {
|
||||
return true;
|
||||
}
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, githubVersion) {
|
||||
if (githubVersion.type === "GHES" /* GHES */ && satisfiesGHESVersion(githubVersion.version, "<3.14", true)) {
|
||||
if (githubVersion.type === "GitHub Enterprise Server" /* GHES */ && satisfiesGHESVersion(githubVersion.version, "<3.14", true)) {
|
||||
return false;
|
||||
}
|
||||
return !areAllRunsUnique(sarifObjects) && !process.env.CODEQL_MERGE_SARIF_DEPRECATION_WARNING;
|
||||
@@ -90046,7 +90046,7 @@ async function throwIfCombineSarifFilesDisabled(sarifObjects, githubVersion) {
|
||||
);
|
||||
}
|
||||
async function shouldDisableCombineSarifFiles(sarifObjects, githubVersion) {
|
||||
if (githubVersion.type === "GHES" /* GHES */) {
|
||||
if (githubVersion.type === "GitHub Enterprise Server" /* GHES */) {
|
||||
if (satisfiesGHESVersion(githubVersion.version, "<3.18", true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -90061,7 +90061,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
const sarifObjects = sarifFiles.map((sarifFile) => {
|
||||
return JSON.parse(fs11.readFileSync(sarifFile, "utf8"));
|
||||
});
|
||||
const deprecationWarningMessage = gitHubVersion.type === "GHES" /* GHES */ ? "and will be removed in GitHub Enterprise Server 3.18" : "and will be removed in July 2025";
|
||||
const deprecationWarningMessage = gitHubVersion.type === "GitHub Enterprise Server" /* GHES */ ? "and will be removed in GitHub Enterprise Server 3.18" : "and will be removed in July 2025";
|
||||
const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload";
|
||||
if (!areAllRunsProducedByCodeQL(sarifObjects)) {
|
||||
await throwIfCombineSarifFilesDisabled(sarifObjects, gitHubVersion);
|
||||
|
||||
Reference in New Issue
Block a user