Skip to content

Commit

Permalink
Merge pull request #75 from Checkmarx/updatevariable
Browse files Browse the repository at this point in the history
check variable state
  • Loading branch information
gabriel-cx authored Nov 28, 2022
2 parents e466aa4 + dca51c2 commit 16a144f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ async function main() {

// Get ENV variables
const githubToken = process.env.INPUT_TOKEN;
const enableAnnotations = process.env.INPUT_DISABLE_ANNOTATIONS;
const enableComments = process.env.INPUT_ENABLE_COMMENTS;
const enableJobsSummary = process.env.INPUT_ENABLE_JOBS_SUMMARY;
let enableAnnotations = process.env.INPUT_DISABLE_ANNOTATIONS;
let enableComments = process.env.INPUT_ENABLE_COMMENTS;
let enableJobsSummary = process.env.INPUT_ENABLE_JOBS_SUMMARY;
const commentsWithQueries = process.env.INPUT_COMMENTS_WITH_QUERIES;
const excludedColumnsForCommentsWithQueries = process.env.INPUT_EXCLUDED_COLUMNS_FOR_COMMENTS_WITH_QUERIES.split(',');
const outputPath = processOutputPath(process.env.INPUT_OUTPUT_PATH);
Expand All @@ -72,6 +72,10 @@ async function main() {
}
}

enableAnnotations = enableAnnotations ? enableAnnotations : "false"
enableComments = enableComments ? enableComments : "false"
enableJobsSummary = enableJobsSummary ? enableJobsSummary : "false"

const parsedResults = readJSON(outputPath.resultsJSONFile);
if (enableAnnotations.toLocaleLowerCase() === "true") {
annotator.annotateChangesWithResults(parsedResults);
Expand Down

0 comments on commit 16a144f

Please sign in to comment.