chore: fix shellcheck findings across migration scripts
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
# shellcheck disable=SC2329
|
||||
|
||||
# =============================================================================
|
||||
# phase1_post_check.sh — Verify Phase 1 (Gitea on Unraid) succeeded
|
||||
@@ -40,6 +41,7 @@ run_check "Admin user authenticates (basic auth)" \
|
||||
curl -sf -o /dev/null -u "${GITEA_ADMIN_USER}:${GITEA_ADMIN_PASSWORD}" "${GITEA_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_ADMIN_TOKEN}" "${GITEA_INTERNAL_URL}/api/v1/user")
|
||||
@@ -54,6 +56,7 @@ run_check "Organization '${GITEA_ORG_NAME}' exists" \
|
||||
curl -sf -o /dev/null -H "Authorization: token ${GITEA_ADMIN_TOKEN}" "${GITEA_INTERNAL_URL}/api/v1/orgs/${GITEA_ORG_NAME}"
|
||||
|
||||
# Check 5: Gitea Actions enabled (verify via settings API)
|
||||
# shellcheck disable=SC2329
|
||||
check_actions() {
|
||||
# The /api/v1/settings/api endpoint returns instance settings.
|
||||
# If Actions are enabled, the Gitea instance will accept runner registrations.
|
||||
|
||||
Reference in New Issue
Block a user