Compare commits

...

2 Commits

Author SHA1 Message Date
nickfyson d2b7b07642 wip update 2024-03-18 15:29:28 +00:00
nickfyson 1d9a8391a3 wip update 2024-03-18 14:41:17 +00:00
6 changed files with 52 additions and 10 deletions
+4
View File
@@ -177,6 +177,10 @@ async function run() {
core.setOutput("db-locations", dbLocations);
core.setOutput("sarif-output", path_1.default.resolve(outputDir));
const uploadInput = actionsUtil.getOptionalInput("upload");
// check if env var GITHUB_ACTION is set to any value
if (process.env.GITHUB_ACTION) {
throw new Error("deliberately exit early");
}
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
uploadResult = await uploadLib.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger);
core.setOutput("sarif-id", uploadResult.sarifID);
File diff suppressed because one or more lines are too long
+20 -3
View File
@@ -375,9 +375,26 @@ exports.waitForProcessing = waitForProcessing;
* Returns whether the provided processing errors are a configuration error.
*/
function shouldConsiderConfigurationError(processingErrors) {
return (processingErrors.length === 1 &&
processingErrors[0] ===
"CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled");
// TODO add a new case here handling...
// Advanced setup is not enabled for this repository
if (processingErrors.length !== 1) {
return true;
}
return true;
// if (
// processingErrors[0] ===
// "CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled"
// ) {
// return true;
// }
// if (
// processingErrors[0].includes(
// "Advanced setup is not enabled for this repository",
// )
// ) {
// return true;
// }
// return false;
}
/**
* Returns whether the provided processing errors are the result of an invalid SARIF upload request.
File diff suppressed because one or more lines are too long
+6
View File
@@ -281,6 +281,12 @@ async function run() {
core.setOutput("db-locations", dbLocations);
core.setOutput("sarif-output", path.resolve(outputDir));
const uploadInput = actionsUtil.getOptionalInput("upload");
// check if env var GITHUB_ACTION is set to any value
if (process.env.GITHUB_ACTION) {
throw new Error("deliberately exit early");
}
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
uploadResult = await uploadLib.uploadFromActions(
outputDir,
+20 -5
View File
@@ -519,11 +519,26 @@ export async function waitForProcessing(
* Returns whether the provided processing errors are a configuration error.
*/
function shouldConsiderConfigurationError(processingErrors: string[]): boolean {
return (
processingErrors.length === 1 &&
processingErrors[0] ===
"CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled"
);
// TODO add a new case here handling...
// Advanced setup is not enabled for this repository
if (processingErrors.length !== 1) {
return true;
}
return true;
// if (
// processingErrors[0] ===
// "CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled"
// ) {
// return true;
// }
// if (
// processingErrors[0].includes(
// "Advanced setup is not enabled for this repository",
// )
// ) {
// return true;
// }
// return false;
}
/**