Skip to content

[WIP] Cleanup project files and caches#136

Merged
LVT-ENG merged 1 commit intomainfrom
copilot/clean-up-project-files
Apr 8, 2026
Merged

[WIP] Cleanup project files and caches#136
LVT-ENG merged 1 commit intomainfrom
copilot/clean-up-project-files

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

import os
import subprocess
import shutil
import sys

1. Configuración de Identidad

TOKEN = os.getenv('GITHUB_TOKEN')
REPO_URL = f"https://{TOKEN}@github.com/tryonme-com/tryonyou-app.git"

def execute_step(name, command):
print(f"🚀 Ejecutando: {name}...")
try:
result = subprocess.run(command, capture_output=True, text=True, check=True)
return True
except subprocess.CalledProcessError as e:
print(f"❌ Error en {name}: {e.stderr}")
return False

def protocol_total():
# --- FASE 1: HULK SMASH (Limpieza) ---
print("🧹 Iniciando limpieza profunda...")
# Resetear Git y borrar archivos no rastreados
execute_step("Git Reset", ["git", "reset", "--hard", "HEAD"])
execute_step("Git Clean", ["git", "clean", "-fd"])

# Borrar carpetas de caché y temporales
for root, dirs, files in os.walk('.'):
    for d in dirs:
        if d in ['__pycache__', '.pytest_cache']:
            shutil.rmtree(os.path.join(root, d), ignore_errors=True)

# --- FASE 2: JULES PUSH (Despliegue) ---
if not TOKEN:
    print("🛑 Error: No hay GITHUB_TOKEN. Abortando subida.")
    return

print("📤 Iniciando subida a GitHub...")
execute_step("Config Remote", ["git", "remote", "set-url", "origin", REPO_URL])
execute_step("Git Add", ["git", "add", "."])

# Commit con marca de tiempo para control real
commit_msg = "Final Build: Clean & Sync Protocol Executed"
if execute_step("Git Commit", ["git", "commit", "-m", commit_msg]):
    if execute_step("Git Push", ["git", "push", "origin", "main"]):
        print("✅ ¡TODO TERMINADO! Entorno limpio y código en la nube.")

if name == "main":
protocol_total()

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tryonyou-app Ready Ready Preview, Comment Apr 8, 2026 3:44pm
tryonyou-pilot Error Error Apr 8, 2026 3:44pm

Request Review

@LVT-ENG LVT-ENG marked this pull request as ready for review April 8, 2026 15:44
@LVT-ENG LVT-ENG merged commit 69bd029 into main Apr 8, 2026
2 of 4 checks passed
Copilot stopped work on behalf of LVT-ENG due to an error April 8, 2026 15:45
Copilot AI requested a review from LVT-ENG April 8, 2026 15:45
@LVT-ENG
Copy link
Copy Markdown
Member

LVT-ENG commented Apr 8, 2026

Sincronizar el PR localmente para verificar

git fetch origin pull/136/head:pr-136
git checkout pr-136

Si todo es correcto, fusionar a main

git checkout main
git merge pr-136
git push origin main

@LVT-ENG
Copy link
Copy Markdown
Member

LVT-ENG commented Apr 8, 2026

git checkout main
git pull origin main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants