fix: add MIGRATION_POLL vars to validation arrays and wizard

MIGRATION_POLL_INTERVAL_SEC and MIGRATION_POLL_TIMEOUT_SEC were in
.env.example and used by phase4, but missing from validate_env()
arrays and configure_env.sh prompts. Preflight would not catch
invalid values. Now validated as positive_integer and prompted
in the REPOSITORIES section of the wizard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
S
2026-03-01 12:55:16 -05:00
parent 01f11df417
commit 6f97f5f08f
2 changed files with 5 additions and 1 deletions

View File

@@ -206,6 +206,7 @@ _ENV_VAR_NAMES=(
GITHUB_USERNAME GITHUB_TOKEN
REPO_NAMES
MIGRATE_ISSUES MIGRATE_LABELS MIGRATE_MILESTONES MIGRATE_WIKI
MIGRATION_POLL_INTERVAL_SEC MIGRATION_POLL_TIMEOUT_SEC
GITHUB_MIRROR_INTERVAL
TLS_MODE CADDY_DOMAIN CADDY_DATA_PATH
PROTECTED_BRANCH REQUIRE_PR_REVIEW REQUIRED_APPROVALS
@@ -228,6 +229,7 @@ _ENV_VAR_TYPES=(
nonempty nonempty
nonempty
bool bool bool bool
positive_integer positive_integer
nonempty
tls_mode nonempty path
nonempty bool integer

View File

@@ -65,7 +65,7 @@ get_env_val() {
# Prompt function
# ---------------------------------------------------------------------------
# Base prompt count (fixed prompts + TLS conditional slots — repo/DB prompts added dynamically)
TOTAL_PROMPTS=61
TOTAL_PROMPTS=63
CURRENT_PROMPT=0
LAST_SECTION=""
@@ -355,6 +355,8 @@ prompt_var "MIGRATE_ISSUES" "Migrate GitHub issues" bool
prompt_var "MIGRATE_LABELS" "Migrate GitHub labels" bool "true" "REPOSITORIES"
prompt_var "MIGRATE_MILESTONES" "Migrate GitHub milestones" bool "false" "REPOSITORIES"
prompt_var "MIGRATE_WIKI" "Migrate GitHub wiki" bool "false" "REPOSITORIES"
prompt_var "MIGRATION_POLL_INTERVAL_SEC" "Poll interval for async migration (seconds)" positive_integer "3" "REPOSITORIES"
prompt_var "MIGRATION_POLL_TIMEOUT_SEC" "Migration timeout per repo (seconds)" positive_integer "600" "REPOSITORIES"
prompt_var "GITHUB_MIRROR_INTERVAL" "How often Gitea pushes to GitHub" nonempty "8h" "REPOSITORIES"
# --- RUNNERS ---