diff --git a/.claude/hooks/monitor-gitea-action.sh b/.claude/hooks/monitor-gitea-action.sh index b999c7c..866b6fb 100755 --- a/.claude/hooks/monitor-gitea-action.sh +++ b/.claude/hooks/monitor-gitea-action.sh @@ -9,7 +9,14 @@ set -euo pipefail GITEA_URL="https://gitea.nucleoriofrio.com" OWNER="nucleo000" REPO="plantillaNuxtAuthentikProxy" -GITEA_TOKEN="${GITEA_TOKEN:-}" # Debe estar en variable de entorno + +# Intentar cargar el token desde el entorno o desde ~/.bashrc +GITEA_TOKEN="${GITEA_TOKEN:-}" +if [ -z "$GITEA_TOKEN" ] && [ -f "$HOME/.bashrc" ]; then + # Intentar extraer el token de .bashrc + GITEA_TOKEN=$(grep -oP "export GITEA_TOKEN=['\"]?\K[^'\"]*" "$HOME/.bashrc" 2>/dev/null || echo "") +fi + MAX_WAIT_SECONDS=600 # 10 minutos POLL_INTERVAL=10 # Consultar cada 10 segundos