Don't wait for processing in test mode
In test mode, we don't upload results, so there's no point waiting for processing.
This commit is contained in:
parent
7c2be06006
commit
ea676e3184
6 changed files with 22 additions and 6 deletions
6
lib/upload-sarif-action.js
generated
6
lib/upload-sarif-action.js
generated
|
|
@ -51,7 +51,11 @@ async function run() {
|
|||
const gitHubVersion = await (0, api_client_1.getGitHubVersionActionsOnly)();
|
||||
const uploadResult = await upload_lib.uploadFromActions(actionsUtil.getRequiredInput("sarif_file"), gitHubVersion, apiDetails, (0, logging_1.getActionsLogger)());
|
||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||
if (actionsUtil.getRequiredInput("wait-for-processing") === "true") {
|
||||
// We don't upload results in test mode, so don't wait for processing
|
||||
if ((0, util_1.isInTestMode)()) {
|
||||
core.debug("In test mode. Waiting for processing is disabled.");
|
||||
}
|
||||
else if (actionsUtil.getRequiredInput("wait-for-processing") === "true") {
|
||||
await upload_lib.waitForProcessing((0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY")), uploadResult.sarifID, apiDetails, (0, logging_1.getActionsLogger)());
|
||||
}
|
||||
await sendSuccessStatusReport(startedAt, uploadResult.statusReport);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue