Skip to content

Release/2.2.1 #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cra-scripts/bito-cra.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ dependency_check.snyk_auth_token=
review_comments=2
server_port=10051
cra_version=latest
exclude_branches=main,master
include_branches=
exclude_files=*.xml,*.json,*.properties,.gitignore,*.yml,*.md
exclude_draft_pr=True
6 changes: 5 additions & 1 deletion cra-scripts/bito-cra.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ $optional_params_cli = @(
"review_scope",
"enable_default_branch",
"exclude_branches",
"include_branches",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing comma in PowerShell array definition

The line "include_branches", is added to the $optional_params_cli array, but there's a missing comma after the last item "output_path" on line 424. This could cause syntax errors when PowerShell tries to parse the array. Consider adding a comma after "output_path" to maintain consistent array formatting.

Code suggestion
Check the AI-generated fix before applying
 -    "output_path"
 +    "output_path",

Code Review Run #dd6d5d


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

"exclude_files",
"exclude_draft_pr",
"dependency_check",
Expand Down Expand Up @@ -452,6 +453,7 @@ $optional_params_server = @(
"review_scope",
"enable_default_branch",
"exclude_branches",
"include_branches",
"exclude_files",
"exclude_draft_pr",
"dependency_check",
Expand Down Expand Up @@ -538,7 +540,7 @@ foreach ($param in $required_params) {
foreach ($param in $optional_params) {
if ($param -eq "dependency_check.snyk_auth_token" -and $props["dependency_check"] -eq "True") {
Ask-For-Param $param $false
} elseif ($param -ne "acceptable_suggestions_enabled" -and $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 "enable_default_branch" -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") {
} elseif ($param -ne "acceptable_suggestions_enabled" -and $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 "enable_default_branch" -and $param -ne "git.domain" -and $param -ne "review_scope" -and $param -ne "exclude_branches" -and $param -ne "include_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") {
Ask-For-Param $param $false
}
}
Expand Down Expand Up @@ -581,6 +583,8 @@ foreach ($param in $required_params + $bee_params + $optional_params) {
$docker_cmd += " --$param=$validated_boolean"
} elseif ($param -eq "exclude_branches") {
$docker_cmd += " --exclude_branches='$($props[$param])'"
} elseif ($param -eq "include_branches") {
$docker_cmd += " --include_branches='$($props[$param])'"
} elseif ($param -eq "exclude_files") {
$docker_cmd += " --exclude_files='$($props[$param])'"
} elseif ($param -eq "exclude_draft_pr") {
Expand Down
6 changes: 5 additions & 1 deletion cra-scripts/bito-cra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ optional_params_cli=(
"review_scope"
"enable_default_branch"
"exclude_branches"
"include_branches"
"exclude_files"
"exclude_draft_pr"
"dependency_check"
Expand Down Expand Up @@ -462,6 +463,7 @@ optional_params_server=(
"review_scope"
"enable_default_branch"
"exclude_branches"
"include_branches"
"exclude_files"
"exclude_draft_pr"
"dependency_check"
Expand Down Expand Up @@ -546,7 +548,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" != "acceptable_suggestions_enabled" ] && [ "$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" != "enable_default_branch" ] && [ "$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" != "acceptable_suggestions_enabled" ] && [ "$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" != "enable_default_branch" ] && [ "$param" != "git.domain" ] && [ "$param" != "review_scope" ] && [ "$param" != "exclude_branches" ] && [ "$param" != "include_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 @@ -595,6 +597,8 @@ for param in "${required_params[@]}" "${bee_params[@]}" "${optional_params[@]}";
docker_cmd+=" --enable_default_branch=${props[$param]}"
elif [ "$param" == "exclude_branches" ]; then
docker_cmd+=" --exclude_branches='${props[$param]}'"
elif [ "$param" == "include_branches" ]; then
docker_cmd+=" --include_branches='${props[$param]}'"
elif [ "$param" == "exclude_files" ]; then
docker_cmd+=" --exclude_files='${props[$param]}'"
elif [ "$param" == "exclude_draft_pr" ]; then
Expand Down