Reset state of repo with updated README

This commit is contained in:
amd-jmacaran
2025-07-15 12:29:35 -04:00
کامیت c3f8f57c80
43فایلهای تغییر یافته به همراه4718 افزوده شده و 0 حذف شده
@@ -0,0 +1,18 @@
import json
import sys
import logging
from typing import List
from repo_config_model import RepoConfig, RepoEntry
logger = logging.getLogger(__name__)
def load_repo_config(config_path: str) -> List[RepoEntry]:
"""Load and validate repository config from JSON using Pydantic."""
try:
with open(config_path, "r", encoding="utf-8") as f:
data = json.load(f)
config = RepoConfig(**data)
return config.repositories
except Exception as e:
logger.error(f"Failed to load or validate config file '{config_path}': {e}")
sys.exit(1)