From ca45cdc97518f78d7e56df1383965a477185aa57 Mon Sep 17 00:00:00 2001 From: thejeshwar-reddy-yerasi-bito Date: Tue, 8 Apr 2025 19:06:59 +0530 Subject: [PATCH 1/3] Update bito-cra.properties --- cra-scripts/bito-cra.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cra-scripts/bito-cra.properties b/cra-scripts/bito-cra.properties index ae1057b..842e41d 100644 --- a/cra-scripts/bito-cra.properties +++ b/cra-scripts/bito-cra.properties @@ -16,6 +16,7 @@ dependency_check.snyk_auth_token= review_comments=2 server_port=10051 cra_version=latest -include_branches= +include_source_branches= +include_target_branches= exclude_files=*.xml,*.json,*.properties,.gitignore,*.yml,*.md exclude_draft_pr=True From 3d6362306b6f8337a7c0bf3a4e7f1fe7093d4830 Mon Sep 17 00:00:00 2001 From: thejeshwar-reddy-yerasi-bito Date: Tue, 8 Apr 2025 22:24:22 +0530 Subject: [PATCH 2/3] Update bito-cra.ps1 --- cra-scripts/bito-cra.ps1 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cra-scripts/bito-cra.ps1 b/cra-scripts/bito-cra.ps1 index 2701d68..a409b48 100755 --- a/cra-scripts/bito-cra.ps1 +++ b/cra-scripts/bito-cra.ps1 @@ -413,7 +413,8 @@ $optional_params_cli = @( "review_scope", "enable_default_branch", "exclude_branches", - "include_branches", + "include_source_branches", + "include_target_branches", "exclude_files", "exclude_draft_pr", "dependency_check", @@ -453,7 +454,8 @@ $optional_params_server = @( "review_scope", "enable_default_branch", "exclude_branches", - "include_branches", + "include_source_branches", + "include_target_branches", "exclude_files", "exclude_draft_pr", "dependency_check", @@ -540,7 +542,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 "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") { + } 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_source_branches" -and $param -ne "include_target_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 } } @@ -583,8 +585,10 @@ 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 "include_source_branches") { + $docker_cmd += " --include_source_branches='$($props[$param])'" + } elseif ($param -eq "include_target_branches") { + $docker_cmd += " --include_target_branches='$($props[$param])'" } elseif ($param -eq "exclude_files") { $docker_cmd += " --exclude_files='$($props[$param])'" } elseif ($param -eq "exclude_draft_pr") { From 9c6f34f4412b81675f712a1216d15d9c0cf440cd Mon Sep 17 00:00:00 2001 From: thejeshwar-reddy-yerasi-bito Date: Tue, 8 Apr 2025 22:26:35 +0530 Subject: [PATCH 3/3] Update bito-cra.sh --- cra-scripts/bito-cra.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cra-scripts/bito-cra.sh b/cra-scripts/bito-cra.sh index fdc7667..053e9bb 100755 --- a/cra-scripts/bito-cra.sh +++ b/cra-scripts/bito-cra.sh @@ -422,7 +422,8 @@ optional_params_cli=( "review_scope" "enable_default_branch" "exclude_branches" - "include_branches" + "include_source_branches" + "include_target_branches" "exclude_files" "exclude_draft_pr" "dependency_check" @@ -463,7 +464,8 @@ optional_params_server=( "review_scope" "enable_default_branch" "exclude_branches" - "include_branches" + "include_source_branches" + "include_target_branches" "exclude_files" "exclude_draft_pr" "dependency_check" @@ -548,7 +550,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" != "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 + 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_source_branches" ] && [ "$param" != "include_target_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 @@ -597,8 +599,10 @@ 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" == "include_source_branches" ]; then + docker_cmd+=" --include_source_branches='${props[$param]}'" + elif [ "$param" == "include_target_branches" ]; then + docker_cmd+=" --include_target_branches='${props[$param]}'" elif [ "$param" == "exclude_files" ]; then docker_cmd+=" --exclude_files='${props[$param]}'" elif [ "$param" == "exclude_draft_pr" ]; then