fix(FN-011): make GitProvider methods synchronous and fix __init__ exports

Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
This commit is contained in:
Fusion
2026-05-14 07:26:05 +02:00
parent f9dd56902f
commit 59d727072e
2 changed files with 5 additions and 12 deletions
-7
View File
@@ -1,19 +1,12 @@
"""Git provider abstraction, credentials, SSH keys, and operations."""
from app.git.credentials import AccessTokenCredential, CredentialStorage, GitCredential
from app.git.operations import GitOperations, LocalGitOperations
from app.git.provider import GitProvider
from app.git.types import ConnectionStatus, CredentialKind, ProviderKind, SshKeyStatus
__all__ = [
"AccessTokenCredential",
"ConnectionStatus",
"CredentialKind",
"CredentialStorage",
"GitCredential",
"GitOperations",
"GitProvider",
"LocalGitOperations",
"ProviderKind",
"SshKeyStatus",
]
+5 -5
View File
@@ -18,7 +18,7 @@ class GitProvider(abc.ABC):
"""Return the provider kind identifier."""
@abc.abstractmethod
async def validate_connection(
def validate_connection(
self, git_url: str, credential_id: str
) -> ConnectionStatus:
"""Validate that the given credential can access *git_url*.
@@ -27,11 +27,11 @@ class GitProvider(abc.ABC):
"""
@abc.abstractmethod
async def list_repositories(self, credential_id: str) -> list[dict[str, Any]]:
def list_repositories(self, credential_id: str) -> list[dict[str, Any]]:
"""List repositories accessible with *credential_id*."""
@abc.abstractmethod
async def create_deploy_key(
def create_deploy_key(
self, git_url: str, public_key: str
) -> str:
"""Register a deploy key on the remote provider.
@@ -40,9 +40,9 @@ class GitProvider(abc.ABC):
"""
@abc.abstractmethod
async def delete_deploy_key(self, git_url: str, deploy_key_id: str) -> None:
def delete_deploy_key(self, git_url: str, deploy_key_id: str) -> None:
"""Remove a previously registered deploy key."""
@abc.abstractmethod
async def get_default_branch(self, git_url: str, credential_id: str) -> str:
def get_default_branch(self, git_url: str, credential_id: str) -> str:
"""Return the default branch name for the repository at *git_url*."""