Files
PTah 07b97bd111 fix: inline git test feedback and use form URLs (0.20.1)
Show git check result next to the button, scroll into view, and test unsaved repo URLs from the form.
2026-06-20 16:29:48 +10:00

22 lines
715 B
Python

#!/usr/bin/env python3
import sys
sys.path.insert(0, "/opt/security-alert-center/backend")
from app.database import SessionLocal
from app.services.agent_update_settings import get_effective_agent_update_config
from app.services.agent_git_release import get_git_release_versions
db = SessionLocal()
try:
cfg = get_effective_agent_update_config(db)
print("cfg rdp:", cfg.rdp_git_repo_url)
print("cfg ssh:", cfg.ssh_git_repo_url)
print("cfg branch:", cfg.git_branch)
r = get_git_release_versions(cfg, db=db, force_refresh=True)
print("versions:", r.versions)
print("errors:", r.errors)
print("from_cache:", r.from_cache)
print("fetched_at:", r.fetched_at)
finally:
db.close()