Refactor code structure for improved readability and maintainability

This commit is contained in:
mi222eh
2026-07-06 21:37:20 +02:00
parent 6ca6a5687a
commit 5f35f56edc
48 changed files with 8128 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
from typing import Any
from gitea.client import GiteaClient
class GitTools:
"""Tools for Gitea git ref operations."""
def __init__(self, client: GiteaClient) -> None:
self._client = client
def create_branch(self, owner: str, repo: str, ref: str, sha: str) -> str:
try:
self._client.create_ref(owner, repo, ref, sha)
return f"Branch '{ref}' created successfully in {owner}/{repo}."
except Exception as e:
return f"Error creating branch: {str(e)}"