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
|
||||
|
||||
# =============================================================================
|
||||
# phase9_post_check.sh — Verify Phase 9 (Security Scanning) succeeded
|
||||
@@ -38,6 +39,7 @@ for repo in "${REPOS[@]}"; do
|
||||
log_info "--- Checking repo: ${repo} ---"
|
||||
|
||||
# Check 1: security-scan.yml exists
|
||||
# shellcheck disable=SC2329
|
||||
check_workflow_exists() {
|
||||
gitea_api GET "/repos/${GITEA_ORG_NAME}/$1/contents/.gitea/workflows/security-scan.yml" >/dev/null
|
||||
}
|
||||
@@ -45,6 +47,7 @@ for repo in "${REPOS[@]}"; do
|
||||
|
||||
# Check 2: Branch protection includes security checks (if required)
|
||||
if [[ "$SECURITY_FAIL_ON_ERROR" == "true" ]]; then
|
||||
# shellcheck disable=SC2329
|
||||
check_status_checks() {
|
||||
local protection
|
||||
protection=$(gitea_api GET "/repos/${GITEA_ORG_NAME}/$1/branch_protections/${PROTECTED_BRANCH}")
|
||||
|
||||
Reference in New Issue
Block a user