Merge pull request #75 from Checkmarx/updatevariable
check variable state
This commit is contained in:
10
src/main.js
10
src/main.js
@ -47,9 +47,9 @@ async function main() {
|
|||||||
|
|
||||||
// Get ENV variables
|
// Get ENV variables
|
||||||
const githubToken = process.env.INPUT_TOKEN;
|
const githubToken = process.env.INPUT_TOKEN;
|
||||||
const enableAnnotations = process.env.INPUT_DISABLE_ANNOTATIONS;
|
let enableAnnotations = process.env.INPUT_DISABLE_ANNOTATIONS;
|
||||||
const enableComments = process.env.INPUT_ENABLE_COMMENTS;
|
let enableComments = process.env.INPUT_ENABLE_COMMENTS;
|
||||||
const enableJobsSummary = process.env.INPUT_ENABLE_JOBS_SUMMARY;
|
let enableJobsSummary = process.env.INPUT_ENABLE_JOBS_SUMMARY;
|
||||||
const commentsWithQueries = process.env.INPUT_COMMENTS_WITH_QUERIES;
|
const commentsWithQueries = process.env.INPUT_COMMENTS_WITH_QUERIES;
|
||||||
const excludedColumnsForCommentsWithQueries = process.env.INPUT_EXCLUDED_COLUMNS_FOR_COMMENTS_WITH_QUERIES.split(',');
|
const excludedColumnsForCommentsWithQueries = process.env.INPUT_EXCLUDED_COLUMNS_FOR_COMMENTS_WITH_QUERIES.split(',');
|
||||||
const outputPath = processOutputPath(process.env.INPUT_OUTPUT_PATH);
|
const outputPath = processOutputPath(process.env.INPUT_OUTPUT_PATH);
|
||||||
@ -72,6 +72,10 @@ async function main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enableAnnotations = enableAnnotations ? enableAnnotations : "false"
|
||||||
|
enableComments = enableComments ? enableComments : "false"
|
||||||
|
enableJobsSummary = enableJobsSummary ? enableJobsSummary : "false"
|
||||||
|
|
||||||
const parsedResults = readJSON(outputPath.resultsJSONFile);
|
const parsedResults = readJSON(outputPath.resultsJSONFile);
|
||||||
if (enableAnnotations.toLocaleLowerCase() === "true") {
|
if (enableAnnotations.toLocaleLowerCase() === "true") {
|
||||||
annotator.annotateChangesWithResults(parsedResults);
|
annotator.annotateChangesWithResults(parsedResults);
|
||||||
|
Reference in New Issue
Block a user