Clarify name of function
This commit is contained in:
parent
757fcd3d21
commit
1de9b371a1
3 changed files with 7 additions and 7 deletions
6
lib/upload-lib.js
generated
6
lib/upload-lib.js
generated
|
|
@ -110,7 +110,7 @@ function areAllRunsUnique(sarifObjects) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
async function showCombineSarifFilesDeprecationWarning(sarifObjects, features, githubVersion) {
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, features, githubVersion) {
|
||||
if (!(await features.getValue(feature_flags_1.Feature.CombineSarifFilesDeprecationWarning))) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -141,7 +141,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
|||
const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-deprecation-notice";
|
||||
if (!areAllRunsProducedByCodeQL(sarifObjects)) {
|
||||
logger.debug("Not all SARIF files were produced by CodeQL. Merging files in the action.");
|
||||
if (await showCombineSarifFilesDeprecationWarning(sarifObjects, features, gitHubVersion)) {
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, features, gitHubVersion)) {
|
||||
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}`);
|
||||
core.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
|
||||
}
|
||||
|
|
@ -172,7 +172,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
|||
}
|
||||
if (!(await codeQL.supportsFeature(tools_features_1.ToolsFeature.SarifMergeRunsFromEqualCategory))) {
|
||||
logger.warning("The CodeQL CLI does not support merging SARIF files. Merging files in the action.");
|
||||
if (await showCombineSarifFilesDeprecationWarning(sarifObjects, features, gitHubVersion)) {
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, features, gitHubVersion)) {
|
||||
logger.warning(`Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage}. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}`);
|
||||
core.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -122,7 +122,7 @@ function areAllRunsUnique(sarifObjects: SarifFile[]): boolean {
|
|||
return true;
|
||||
}
|
||||
|
||||
async function showCombineSarifFilesDeprecationWarning(
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects: util.SarifFile[],
|
||||
features: Features,
|
||||
githubVersion: GitHubVersion,
|
||||
|
|
@ -178,7 +178,7 @@ async function combineSarifFilesUsingCLI(
|
|||
);
|
||||
|
||||
if (
|
||||
await showCombineSarifFilesDeprecationWarning(
|
||||
await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
features,
|
||||
gitHubVersion,
|
||||
|
|
@ -241,7 +241,7 @@ async function combineSarifFilesUsingCLI(
|
|||
);
|
||||
|
||||
if (
|
||||
await showCombineSarifFilesDeprecationWarning(
|
||||
await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
features,
|
||||
gitHubVersion,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue