Skip to content

Commit

Permalink
Showing 3 changed files with 24 additions and 22 deletions.
10 changes: 6 additions & 4 deletions lib/analyze-action.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/analyze-action.js.map

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

34 changes: 17 additions & 17 deletions src/analyze-action.ts
@@ -79,25 +79,25 @@ async function run() {
logger
);

if (actionsUtil.getRequiredInput("upload") !== "true") {
if (actionsUtil.getRequiredInput("upload") === "true") {
const uploadStats = await upload_lib.uploadFromActions(
outputDir,
parseRepositoryNwo(actionsUtil.getRequiredEnvParam("GITHUB_REPOSITORY")),
await actionsUtil.getCommitOid(),
await actionsUtil.getRef(),
await actionsUtil.getAnalysisKey(),
actionsUtil.getRequiredEnvParam("GITHUB_WORKFLOW"),
actionsUtil.getWorkflowRunID(),
actionsUtil.getRequiredInput("checkout_path"),
actionsUtil.getRequiredInput("matrix"),
apiDetails,
logger
);
stats = { ...queriesStats, ...uploadStats };
} else {
logger.info("Not uploading results");
return;
stats = { ...queriesStats }
}

const uploadStats = await upload_lib.uploadFromActions(
outputDir,
parseRepositoryNwo(actionsUtil.getRequiredEnvParam("GITHUB_REPOSITORY")),
await actionsUtil.getCommitOid(),
await actionsUtil.getRef(),
await actionsUtil.getAnalysisKey(),
actionsUtil.getRequiredEnvParam("GITHUB_WORKFLOW"),
actionsUtil.getWorkflowRunID(),
actionsUtil.getRequiredInput("checkout_path"),
actionsUtil.getRequiredInput("matrix"),
apiDetails,
logger
);
stats = { ...queriesStats, ...uploadStats };
} catch (error) {
core.setFailed(error.message);
console.log(error);

0 comments on commit 1da4ce5

Please sign in to comment.