Skip to content

Commit 532c3e2

Browse files
Merge pull request #44 from gitbito/release/1.7.0
Update bito-cra.sh
2 parents 227bbdb + fc654bc commit 532c3e2

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

cra-scripts/bito-cra.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ git.domain=
88
static_analysis=True
99
static_analysis_tool=fb_infer,astral_ruff,mypy
1010
linters_feedback=True
11+
secret_scanner_feedback=True
1112
review_scope=
1213
dependency_check=False
1314
code_context=True

cra-scripts/bito-cra.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ $optional_params_cli = @(
408408
"static_analysis",
409409
"static_analysis_tool",
410410
"linters_feedback",
411+
"secret_scanner_feedback",
411412
"review_scope",
412413
"exclude_branches",
413414
"exclude_files",
@@ -444,6 +445,7 @@ $optional_params_server = @(
444445
"static_analysis",
445446
"static_analysis_tool",
446447
"linters_feedback",
448+
"secret_scanner_feedback",
447449
"review_scope",
448450
"exclude_branches",
449451
"exclude_files",
@@ -532,7 +534,7 @@ foreach ($param in $required_params) {
532534
foreach ($param in $optional_params) {
533535
if ($param -eq "dependency_check.snyk_auth_token" -and $props["dependency_check"] -eq "True") {
534536
Ask-For-Param $param $false
535-
} elseif ($param -ne "dependency_check.snyk_auth_token" -and $param -ne "env" -and $param -ne "cli_path" -and $param -ne "output_path" -and $param -ne "static_analysis_tool" -and $param -ne "linters_feedback" -and $param -ne "git.domain" -and $param -ne "review_scope" -and $param -ne "exclude_branches" -and $param -ne "exclude_files" -and $param -ne "exclude_draft_pr" -and $param -ne "cr_event_type" -and $param -ne "posting_to_pr" -and $param -ne "custom_rules.configured_ws_ids" -and $param -ne "custom_rules.aws_access_key_id" -and $param -ne "custom_rules.aws_secret_access_key" -and $param -ne "custom_rules.region_name" -and $param -ne "custom_rules.bucket_name" -and $param -ne "custom_rules.aes_key" -and $param -ne "code_context_config.partial_timeout" -and $param -ne "code_context_config.max_depth" -and $param -ne "code_context_config.kill_timeout_sec") {
537+
} elseif ($param -ne "dependency_check.snyk_auth_token" -and $param -ne "env" -and $param -ne "cli_path" -and $param -ne "output_path" -and $param -ne "static_analysis_tool" -and $param -ne "linters_feedback" -and $param -ne "secret_scanner_feedback" -and $param -ne "git.domain" -and $param -ne "review_scope" -and $param -ne "exclude_branches" -and $param -ne "exclude_files" -and $param -ne "exclude_draft_pr" -and $param -ne "cr_event_type" -and $param -ne "posting_to_pr" -and $param -ne "custom_rules.configured_ws_ids" -and $param -ne "custom_rules.aws_access_key_id" -and $param -ne "custom_rules.aws_secret_access_key" -and $param -ne "custom_rules.region_name" -and $param -ne "custom_rules.bucket_name" -and $param -ne "custom_rules.aes_key" -and $param -ne "code_context_config.partial_timeout" -and $param -ne "code_context_config.max_depth" -and $param -ne "code_context_config.kill_timeout_sec") {
536538
Ask-For-Param $param $false
537539
}
538540
}
@@ -561,6 +563,9 @@ foreach ($param in $required_params + $bee_params + $optional_params) {
561563
} elseif ($param -eq "linters_feedback") {
562564
$validated_boolean = Validate-Boolean $props[$param]
563565
$docker_cmd += " --$param=$validated_boolean"
566+
} elseif ($param -eq "secret_scanner_feedback") {
567+
$validated_boolean = Validate-Boolean $props[$param]
568+
$docker_cmd += " --$param=$validated_boolean"
564569
} elseif ($param -eq "review_scope") {
565570
$scopes = $($props[$param]) -replace ',\s*', ','
566571
$docker_cmd += " --$param='[$scopes]'"

cra-scripts/bito-cra.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ optional_params_cli=(
417417
"static_analysis"
418418
"static_analysis_tool"
419419
"linters_feedback"
420+
"secret_scanner_feedback"
420421
"review_scope"
421422
"exclude_branches"
422423
"exclude_files"
@@ -454,6 +455,7 @@ optional_params_server=(
454455
"static_analysis"
455456
"static_analysis_tool"
456457
"linters_feedback"
458+
"secret_scanner_feedback"
457459
"review_scope"
458460
"exclude_branches"
459461
"exclude_files"
@@ -540,7 +542,7 @@ done
540542
for param in "${optional_params[@]}"; do
541543
if [ "$param" == "dependency_check.snyk_auth_token" ] && [ "${props["dependency_check"]}" == "True" ]; then
542544
ask_for_param "$param" "False"
543-
elif [ "$param" != "dependency_check.snyk_auth_token" ] && [ "$param" != "env" ] && [ "$param" != "cli_path" ] && [ "$param" != "output_path" ] && [ "$param" != "static_analysis_tool" ] && [ "$param" != "linters_feedback" ] && [ "$param" != "git.domain" ] && [ "$param" != "review_scope" ] && [ "$param" != "exclude_branches" ] && [ "$param" != "nexus_url" ] && [ "$param" != "exclude_files" ] && [ "$param" != "exclude_draft_pr" ] && [ "$param" != "cr_event_type" ] && [ "$param" != "posting_to_pr" ] && [ "$param" != "custom_rules.configured_ws_ids" ] && [ "$param" != "custom_rules.aws_access_key_id" ] && [ "$param" != "custom_rules.aws_secret_access_key" ] && [ "$param" != "custom_rules.region_name" ] && [ "$param" != "custom_rules.bucket_name" ] && [ "$param" != "custom_rules.aes_key" ] && [ "$param" != "code_context_config.partial_timeout" ] && [ "$param" != "code_context_config.max_depth" ] && [ "$param" != "code_context_config.kill_timeout_sec" ]; then
545+
elif [ "$param" != "dependency_check.snyk_auth_token" ] && [ "$param" != "env" ] && [ "$param" != "cli_path" ] && [ "$param" != "output_path" ] && [ "$param" != "static_analysis_tool" ] && [ "$param" != "linters_feedback" ] && [ "$param" != "secret_scanner_feedback" ] && [ "$param" != "git.domain" ] && [ "$param" != "review_scope" ] && [ "$param" != "exclude_branches" ] && [ "$param" != "nexus_url" ] && [ "$param" != "exclude_files" ] && [ "$param" != "exclude_draft_pr" ] && [ "$param" != "cr_event_type" ] && [ "$param" != "posting_to_pr" ] && [ "$param" != "custom_rules.configured_ws_ids" ] && [ "$param" != "custom_rules.aws_access_key_id" ] && [ "$param" != "custom_rules.aws_secret_access_key" ] && [ "$param" != "custom_rules.region_name" ] && [ "$param" != "custom_rules.bucket_name" ] && [ "$param" != "custom_rules.aes_key" ] && [ "$param" != "code_context_config.partial_timeout" ] && [ "$param" != "code_context_config.max_depth" ] && [ "$param" != "code_context_config.kill_timeout_sec" ]; then
544546
ask_for_param "$param" "False"
545547
fi
546548
done
@@ -575,6 +577,9 @@ for param in "${required_params[@]}" "${bee_params[@]}" "${optional_params[@]}";
575577
elif [ "$param" == "linters_feedback" ]; then
576578
props[$param]=$(validate_boolean "${props[$param]}")
577579
docker_cmd+=" --linters_feedback=${props[$param]}"
580+
elif [ "$param" == "secret_scanner_feedback" ]; then
581+
props[$param]=$(validate_boolean "${props[$param]}")
582+
docker_cmd+=" --secret_scanner_feedback=${props[$param]}"
578583
elif [ "$param" == "review_scope" ]; then
579584
scopes=$(echo ${props[$param]} | sed 's/, */,/g')
580585
docker_cmd+=" --review_scope='[$scopes]'"

0 commit comments

Comments
 (0)