chore: fix shellcheck findings across migration scripts

This commit is contained in:
S
2026-02-28 21:39:23 -05:00
parent 572e4c151c
commit 743f1281e6
23 changed files with 68 additions and 22 deletions

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
# shellcheck disable=SC2329
# =============================================================================
# phase7_post_check.sh — Verify Phase 7 (Branch Protection) succeeded
@@ -37,12 +38,14 @@ for repo in "${REPOS[@]}"; do
log_info "--- Checking repo: ${repo} ---"
# Check 1: Protection rule exists
# shellcheck disable=SC2329
check_protection_exists() {
gitea_api GET "/repos/${GITEA_ORG_NAME}/$1/branch_protections/${PROTECTED_BRANCH}" >/dev/null
}
run_check "Branch protection exists for '${PROTECTED_BRANCH}' on ${repo}" check_protection_exists "$repo"
# Check 2: Push is blocked (enable_push should be false)
# shellcheck disable=SC2329
check_push_blocked() {
local protection
protection=$(gitea_api GET "/repos/${GITEA_ORG_NAME}/${repo}/branch_protections/${PROTECTED_BRANCH}")