Skip to content

Commit

Permalink
Showing 7 changed files with 10 additions and 54 deletions.
1 change: 0 additions & 1 deletion analyze/action.yml
@@ -63,7 +63,6 @@ inputs:
wait-for-processing:
description: If true, the Action will wait for the uploaded SARIF to be processed before completing.
required: true
# If changing this, make sure to update workflow.ts accordingly.
default: "true"
token:
default: ${{ github.token }}
5 changes: 1 addition & 4 deletions lib/init-action-post-helper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/init-action-post-helper.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 1 addition & 13 deletions lib/workflow.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/workflow.js.map

Large diffs are not rendered by default.

17 changes: 6 additions & 11 deletions src/init-action-post-helper.ts
@@ -13,7 +13,6 @@ import {
getCategoryInputOrThrow,
getCheckoutPathInputOrThrow,
getUploadInputOrThrow,
getWaitForProcessingInputOrThrow,
getWorkflow,
} from "./workflow";

@@ -53,8 +52,6 @@ async function uploadFailedSarif(
}
const category = getCategoryInputOrThrow(workflow, jobName, matrix);
const checkoutPath = getCheckoutPathInputOrThrow(workflow, jobName, matrix);
const waitForProcessing =
getWaitForProcessingInputOrThrow(workflow, jobName, matrix) === "true";

const sarifFile = "../codeql-failed-run.sarif";
await codeql.diagnosticsExport(sarifFile, category);
@@ -66,14 +63,12 @@ async function uploadFailedSarif(
category,
logger
);
if (waitForProcessing) {
await uploadLib.waitForProcessing(
repositoryNwo,
uploadResult.sarifID,
logger,
{ isUnsuccessfulExecution: true }
);
}
await uploadLib.waitForProcessing(
repositoryNwo,
uploadResult.sarifID,
logger,
{ isUnsuccessfulExecution: true }
);
}

export async function run(
23 changes: 0 additions & 23 deletions src/workflow.ts
@@ -410,29 +410,6 @@ export function getUploadInputOrThrow(
);
}

/**
* Makes a best effort attempt to retrieve the wait-for-processing input for the
* particular job, given a set of matrix variables.
*
* @returns the wait-for-processing input
* @throws an error if the wait-for-processing input could not be determined
*/
export function getWaitForProcessingInputOrThrow(
workflow: Workflow,
jobName: string,
matrixVars: { [key: string]: string } | undefined
): string {
return (
getInputOrThrow(
workflow,
jobName,
"github/codeql-action/analyze",
"wait-for-processing",
matrixVars
) || "true" // if unspecified, wait-for-processing defaults to true
);
}

/**
* Makes a best effort attempt to retrieve the checkout_path input for the
* particular job, given a set of matrix variables.

0 comments on commit 00a3c45

Please sign in to comment.