Remove redundant log messages
This commit is contained in:
parent
3224214d91
commit
59ebabde5d
3 changed files with 3 additions and 13 deletions
5
lib/init-action-post-helper.js
generated
5
lib/init-action-post-helper.js
generated
|
|
@ -42,12 +42,10 @@ function createFailedUploadFailedSarifResult(error) {
|
|||
async function maybeUploadFailedSarif(config, repositoryNwo, featureEnablement, logger) {
|
||||
var _a;
|
||||
if (!config.codeQLCmd) {
|
||||
logger.warning("CodeQL command not found. Unable to upload failed SARIF file.");
|
||||
return { upload_failed_run_skipped_because: "CodeQL command not found" };
|
||||
}
|
||||
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
||||
if (!(await featureEnablement.getValue(feature_flags_1.Feature.UploadFailedSarifEnabled, codeql))) {
|
||||
logger.debug("Uploading failed SARIF is disabled.");
|
||||
return { upload_failed_run_skipped_because: "Feature disabled" };
|
||||
}
|
||||
const workflow = await (0, workflow_1.getWorkflow)();
|
||||
|
|
@ -55,7 +53,6 @@ async function maybeUploadFailedSarif(config, repositoryNwo, featureEnablement,
|
|||
const matrix = (0, util_1.parseMatrixInput)(actionsUtil.getRequiredInput("matrix"));
|
||||
if ((0, workflow_1.getUploadInputOrThrow)(workflow, jobName, matrix) !== "true" ||
|
||||
(0, util_1.isInTestMode)()) {
|
||||
logger.debug("Won't upload a failed SARIF file since SARIF upload is disabled.");
|
||||
return { upload_failed_run_skipped_because: "SARIF upload is disabled" };
|
||||
}
|
||||
const category = (0, workflow_1.getCategoryInputOrThrow)(workflow, jobName, matrix);
|
||||
|
|
@ -92,7 +89,7 @@ async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, p
|
|||
}
|
||||
const uploadFailedSarifResult = await tryUploadSarifIfRunFailed(config, repositoryNwo, featureEnablement, logger);
|
||||
if (uploadFailedSarifResult.upload_failed_run_skipped_because) {
|
||||
logger.debug("Skipped uploading a failed SARIF file for this CodeQL code scanning run because: " +
|
||||
logger.debug("Won't upload a failed SARIF file for this CodeQL code scanning run because: " +
|
||||
`${uploadFailedSarifResult.upload_failed_run_skipped_because}.`);
|
||||
}
|
||||
// Throw an error if in integration tests, we expected to upload a SARIF file for a failed run
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue