feat: Implement user profile preferences for start page, Git identity, and task drawer auto-open, alongside Git server default branch configuration.

This commit is contained in:
2026-03-08 10:19:38 +03:00
parent b452335370
commit 8ac5a752bd
30 changed files with 2041 additions and 211 deletions

31
test_pat_retrieve.py Normal file
View File

@@ -0,0 +1,31 @@
import asyncio
from src.core.database import SessionLocal
from src.models.git import GitServerConfig, GitProvider
from src.api.routes.git_schemas import GitServerConfigCreate
from src.api.routes.git import test_git_config
async def run():
db = SessionLocal()
config_create = GitServerConfigCreate(
name="test",
provider=GitProvider.GITEA,
url="https://git.bebesh.ru",
pat="********",
config_id="f3e7652c-b850-4df9-9773-99e7f9d73dea"
)
# Let's mock git_service.test_connection to see what PAT it gets it
from src.api.routes import git
original_test = git.git_service.test_connection
async def mock_test(provider, url, pat):
print(f"PAT received by mock: '{pat}'")
return True
git.git_service.test_connection = mock_test
try:
await test_git_config(config_create, db=db)
finally:
git.git_service.test_connection = original_test
asyncio.run(run())