mirror of
https://github.com/github/codeql-action
synced 2026-05-23 20:00:54 +03:00
Merge branch 'main' into henrymercer/skip-file-coverage-rollout
This commit is contained in:
Generated
-5
@@ -162241,11 +162241,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
+2
-13
@@ -107990,11 +107990,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
@@ -112463,10 +112458,7 @@ function areAllRunsUnique(sarifLogs) {
|
||||
// src/upload-lib.ts
|
||||
var GENERIC_403_MSG = "The repo on which this action is running has not opted-in to CodeQL code scanning.";
|
||||
var GENERIC_404_MSG = "The CodeQL code scanning feature is forbidden on this repository.";
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, githubVersion) {
|
||||
if (githubVersion.type === "GitHub Enterprise Server" /* GHES */ && satisfiesGHESVersion(githubVersion.version, "<3.14", true)) {
|
||||
return false;
|
||||
}
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects) {
|
||||
return !areAllRunsUnique(sarifObjects) && !process.env.CODEQL_MERGE_SARIF_DEPRECATION_WARNING;
|
||||
}
|
||||
async function throwIfCombineSarifFilesDisabled(sarifObjects, githubVersion) {
|
||||
@@ -112499,10 +112491,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
logger.debug(
|
||||
"Not all SARIF files were produced by CodeQL. Merging files in the action."
|
||||
);
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
gitHubVersion
|
||||
)) {
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects)) {
|
||||
logger.warning(
|
||||
`Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}`
|
||||
);
|
||||
|
||||
Generated
-5
@@ -104290,11 +104290,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
+2
-13
@@ -165727,11 +165727,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
@@ -169553,10 +169548,7 @@ function areAllRunsUnique(sarifLogs) {
|
||||
// src/upload-lib.ts
|
||||
var GENERIC_403_MSG = "The repo on which this action is running has not opted-in to CodeQL code scanning.";
|
||||
var GENERIC_404_MSG = "The CodeQL code scanning feature is forbidden on this repository.";
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, githubVersion) {
|
||||
if (githubVersion.type === "GitHub Enterprise Server" /* GHES */ && satisfiesGHESVersion(githubVersion.version, "<3.14", true)) {
|
||||
return false;
|
||||
}
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects) {
|
||||
return !areAllRunsUnique(sarifObjects) && !process.env.CODEQL_MERGE_SARIF_DEPRECATION_WARNING;
|
||||
}
|
||||
async function throwIfCombineSarifFilesDisabled(sarifObjects, githubVersion) {
|
||||
@@ -169589,10 +169581,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
logger.debug(
|
||||
"Not all SARIF files were produced by CodeQL. Merging files in the action."
|
||||
);
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
gitHubVersion
|
||||
)) {
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects)) {
|
||||
logger.warning(
|
||||
`Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}`
|
||||
);
|
||||
|
||||
Generated
+3
-21
@@ -104426,10 +104426,7 @@ var repositoryPropertyParsers = {
|
||||
["github-codeql-extra-queries" /* EXTRA_QUERIES */]: stringProperty,
|
||||
["github-codeql-file-coverage-on-prs" /* FILE_COVERAGE_ON_PRS */]: booleanProperty
|
||||
};
|
||||
async function loadPropertiesFromApi(gitHubVersion, logger, repositoryNwo) {
|
||||
if (gitHubVersion.type === "GitHub Enterprise Server" /* GHES */) {
|
||||
return {};
|
||||
}
|
||||
async function loadPropertiesFromApi(logger, repositoryNwo) {
|
||||
try {
|
||||
const response = await getRepositoryProperties(repositoryNwo);
|
||||
const remoteProperties = response.data;
|
||||
@@ -105551,11 +105548,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
@@ -109651,8 +109643,6 @@ async function run(startedAt) {
|
||||
);
|
||||
const repositoryPropertiesResult = await loadRepositoryProperties(
|
||||
repositoryNwo,
|
||||
gitHubVersion,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
const jobRunUuid = v4_default();
|
||||
@@ -110065,7 +110055,7 @@ exec ${goBinaryPath} "$@"`
|
||||
logger
|
||||
);
|
||||
}
|
||||
async function loadRepositoryProperties(repositoryNwo, gitHubVersion, features, logger) {
|
||||
async function loadRepositoryProperties(repositoryNwo, logger) {
|
||||
const repositoryOwnerType = github2.context.payload.repository?.owner.type;
|
||||
logger.debug(
|
||||
`Repository owner type is '${repositoryOwnerType ?? "unknown"}'.`
|
||||
@@ -110076,16 +110066,8 @@ async function loadRepositoryProperties(repositoryNwo, gitHubVersion, features,
|
||||
);
|
||||
return new Success({});
|
||||
}
|
||||
if (!await features.getValue("use_repository_properties_v2" /* UseRepositoryProperties */)) {
|
||||
logger.debug(
|
||||
"Skipping loading repository properties because the UseRepositoryProperties feature flag is disabled."
|
||||
);
|
||||
return new Success({});
|
||||
}
|
||||
try {
|
||||
return new Success(
|
||||
await loadPropertiesFromApi(gitHubVersion, logger, repositoryNwo)
|
||||
);
|
||||
return new Success(await loadPropertiesFromApi(logger, repositoryNwo));
|
||||
} catch (error3) {
|
||||
logger.warning(
|
||||
`Failed to load repository properties: ${getErrorMessage(error3)}`
|
||||
|
||||
Generated
-5
@@ -104281,11 +104281,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -104177,11 +104177,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -161647,11 +161647,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
-5
@@ -120969,11 +120969,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
+2
-13
@@ -107437,11 +107437,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
@@ -110350,10 +110345,7 @@ function areAllRunsUnique(sarifLogs) {
|
||||
// src/upload-lib.ts
|
||||
var GENERIC_403_MSG = "The repo on which this action is running has not opted-in to CodeQL code scanning.";
|
||||
var GENERIC_404_MSG = "The CodeQL code scanning feature is forbidden on this repository.";
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, githubVersion) {
|
||||
if (githubVersion.type === "GitHub Enterprise Server" /* GHES */ && satisfiesGHESVersion(githubVersion.version, "<3.14", true)) {
|
||||
return false;
|
||||
}
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects) {
|
||||
return !areAllRunsUnique(sarifObjects) && !process.env.CODEQL_MERGE_SARIF_DEPRECATION_WARNING;
|
||||
}
|
||||
async function throwIfCombineSarifFilesDisabled(sarifObjects, githubVersion) {
|
||||
@@ -110386,10 +110378,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
logger.debug(
|
||||
"Not all SARIF files were produced by CodeQL. Merging files in the action."
|
||||
);
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
gitHubVersion
|
||||
)) {
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects)) {
|
||||
logger.warning(
|
||||
`Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}`
|
||||
);
|
||||
|
||||
Generated
-5
@@ -161809,11 +161809,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
|
||||
Generated
+2
-13
@@ -107150,11 +107150,6 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
|
||||
},
|
||||
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",
|
||||
@@ -110942,10 +110937,7 @@ async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVe
|
||||
// src/upload-lib.ts
|
||||
var GENERIC_403_MSG = "The repo on which this action is running has not opted-in to CodeQL code scanning.";
|
||||
var GENERIC_404_MSG = "The CodeQL code scanning feature is forbidden on this repository.";
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, githubVersion) {
|
||||
if (githubVersion.type === "GitHub Enterprise Server" /* GHES */ && satisfiesGHESVersion(githubVersion.version, "<3.14", true)) {
|
||||
return false;
|
||||
}
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects) {
|
||||
return !areAllRunsUnique(sarifObjects) && !process.env.CODEQL_MERGE_SARIF_DEPRECATION_WARNING;
|
||||
}
|
||||
async function throwIfCombineSarifFilesDisabled(sarifObjects, githubVersion) {
|
||||
@@ -110978,10 +110970,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
logger.debug(
|
||||
"Not all SARIF files were produced by CodeQL. Merging files in the action."
|
||||
);
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
gitHubVersion
|
||||
)) {
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects)) {
|
||||
logger.warning(
|
||||
`Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user