fix: auto-load YAML config on CLI startup

CLI now reads ~/.config/redmine-reporter/config.yml automatically.
Previously Config.load_yaml() existed but was never called.
This commit is contained in:
Кокос Артем Николаевич
2026-07-03 18:19:30 +07:00
parent b1a565bc9e
commit 0fa4e271a7
2 changed files with 19 additions and 1 deletions

View File

@@ -211,6 +211,10 @@ def main(argv: Optional[List[str]] = None) -> int:
Config.set_redmine_url(args.url)
Config.set_redmine_api_key(args.api_key)
# Автозагрузка YAML-конфига
yaml_path = args.config_path
Config.load_yaml(yaml_path)
# Настройка уровня логирования
if args.debug:
logging.basicConfig(level=logging.DEBUG, format="%(levelname)s: %(message)s")