Skip to content

Commit

Permalink
Update bito-cra.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhbohra-bito authored Dec 3, 2024
1 parent 227bbdb commit 4d6454c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cra-scripts/bito-cra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ optional_params_cli=(
"static_analysis"
"static_analysis_tool"
"linters_feedback"
"secret_scanner_feedback"
"review_scope"
"exclude_branches"
"exclude_files"
Expand Down Expand Up @@ -454,6 +455,7 @@ optional_params_server=(
"static_analysis"
"static_analysis_tool"
"linters_feedback"
"secret_scanner_feedback"
"review_scope"
"exclude_branches"
"exclude_files"
Expand Down Expand Up @@ -540,7 +542,7 @@ done
for param in "${optional_params[@]}"; do
if [ "$param" == "dependency_check.snyk_auth_token" ] && [ "${props["dependency_check"]}" == "True" ]; then
ask_for_param "$param" "False"
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
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
ask_for_param "$param" "False"
fi
done
Expand Down Expand Up @@ -575,6 +577,9 @@ for param in "${required_params[@]}" "${bee_params[@]}" "${optional_params[@]}";
elif [ "$param" == "linters_feedback" ]; then
props[$param]=$(validate_boolean "${props[$param]}")
docker_cmd+=" --linters_feedback=${props[$param]}"
elif [ "$param" == "secret_scanner_feedback" ]; then
props[$param]=$(validate_boolean "${props[$param]}")
docker_cmd+=" --secret_scanner_feedback=${props[$param]}"
elif [ "$param" == "review_scope" ]; then
scopes=$(echo ${props[$param]} | sed 's/, */,/g')
docker_cmd+=" --review_scope='[$scopes]'"
Expand Down

0 comments on commit 4d6454c

Please sign in to comment.