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
# =============================================================================
# phase2_post_check.sh — Verify Phase 2 (Gitea on Fedora) succeeded
@@ -41,6 +42,7 @@ run_check "Admin user authenticates (basic auth)" \
curl -sf -o /dev/null -u "${GITEA_ADMIN_USER}:${GITEA_ADMIN_PASSWORD}" "${GITEA_BACKUP_INTERNAL_URL}/api/v1/user"
# Check 3: API token works and returns correct username
# shellcheck disable=SC2329
check_token() {
local response
response=$(curl -sf -H "Authorization: token ${GITEA_BACKUP_ADMIN_TOKEN}" "${GITEA_BACKUP_INTERNAL_URL}/api/v1/user")
@@ -53,6 +55,7 @@ run_check "Backup API token valid (returns correct username)" check_token
# Check 4: Gitea Actions enabled (verify via settings API)
# No org check here — the Fedora instance doesn't create an org.
# Mirror repos are stored under the admin user's namespace.
# shellcheck disable=SC2329
check_actions() {
curl -sf -H "Authorization: token ${GITEA_BACKUP_ADMIN_TOKEN}" "${GITEA_BACKUP_INTERNAL_URL}/api/v1/settings/api" -o /dev/null
}