Skip to content

Commit 5787cf9

Browse files
Update bito-cra.ps1 - default branch and acceptable suggestions
1 parent 532c3e2 commit 5787cf9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

cra-scripts/bito-cra.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,14 @@ $required_params_cli = @(
404404
)
405405

406406
$optional_params_cli = @(
407+
"acceptable_suggestions_enabled",
407408
"review_comments",
408409
"static_analysis",
409410
"static_analysis_tool",
410411
"linters_feedback",
411412
"secret_scanner_feedback",
412413
"review_scope",
414+
"enable_default_branch",
413415
"exclude_branches",
414416
"exclude_files",
415417
"exclude_draft_pr",
@@ -438,6 +440,7 @@ $required_params_server = @(
438440
)
439441

440442
$optional_params_server = @(
443+
"acceptable_suggestions_enabled",
441444
"git.provider",
442445
"git.access_token",
443446
"bito_cli.bito.access_key",
@@ -447,6 +450,7 @@ $optional_params_server = @(
447450
"linters_feedback",
448451
"secret_scanner_feedback",
449452
"review_scope",
453+
"enable_default_branch",
450454
"exclude_branches",
451455
"exclude_files",
452456
"exclude_draft_pr",
@@ -534,7 +538,7 @@ foreach ($param in $required_params) {
534538
foreach ($param in $optional_params) {
535539
if ($param -eq "dependency_check.snyk_auth_token" -and $props["dependency_check"] -eq "True") {
536540
Ask-For-Param $param $false
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") {
541+
} 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") {
538542
Ask-For-Param $param $false
539543
}
540544
}
@@ -566,9 +570,15 @@ foreach ($param in $required_params + $bee_params + $optional_params) {
566570
} elseif ($param -eq "secret_scanner_feedback") {
567571
$validated_boolean = Validate-Boolean $props[$param]
568572
$docker_cmd += " --$param=$validated_boolean"
573+
} elseif ($param -eq "acceptable_suggestions_enabled") {
574+
$validated_boolean = Validate-Boolean $props[$param]
575+
$docker_cmd += " --$param=$validated_boolean"
569576
} elseif ($param -eq "review_scope") {
570577
$scopes = $($props[$param]) -replace ',\s*', ','
571578
$docker_cmd += " --$param='[$scopes]'"
579+
} elseif ($param -eq "enable_default_branch") {
580+
$validated_boolean = Validate-Boolean $props[$param]
581+
$docker_cmd += " --$param=$validated_boolean"
572582
} elseif ($param -eq "exclude_branches") {
573583
$docker_cmd += " --exclude_branches='$($props[$param])'"
574584
} elseif ($param -eq "exclude_files") {

0 commit comments

Comments
 (0)