From f6cfa3bd23ed80d6f295d9362675a768a44761ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80?= <78488229+viktor138irk@users.noreply.github.com> Date: Tue, 12 May 2026 00:16:25 +0900 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=20GitHub=20cre?= =?UTF-8?q?dentials?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/config_store.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/backend/config_store.py b/backend/config_store.py index 284dc4d..8982e65 100644 --- a/backend/config_store.py +++ b/backend/config_store.py @@ -57,6 +57,25 @@ def get_openai_model() -> str: return get_setting('OPENAI_MODEL') or os.getenv('OPENAI_MODEL') or 'gpt-5' +def get_github_username() -> str: + return get_setting('GITHUB_USERNAME') or os.getenv('GITHUB_USERNAME') or '' + + +def get_github_token() -> Optional[str]: + return get_setting('GITHUB_TOKEN') or os.getenv('GITHUB_TOKEN') or None + + +def has_github_token() -> bool: + return bool(get_github_token()) + + +def get_github_public_config() -> dict: + return { + 'username': get_github_username(), + 'token_set': has_github_token(), + } + + def get_proxy_config() -> dict: return { 'enabled': (get_setting('PROXY_ENABLED') or os.getenv('PROXY_ENABLED') or '0') == '1',