fix logging

This commit is contained in:
Michael Ingvarsson
2026-07-16 12:15:45 +02:00
parent 88d9ac2105
commit 9e40e7fed8
3 changed files with 27 additions and 15 deletions
+5 -1
View File
@@ -1,10 +1,14 @@
"""Tools for Gitea pull request operations."""
import json
import logging
from typing import Any
from gitea.client import GiteaClient
from gitea.models import PullRequestModel, CommentModel
logger: logging.Logger = logging.getLogger("gitea.tools.pr_tools")
_MAX_DIFF_CHARS: int = 15_000
@@ -93,7 +97,7 @@ class PRTools:
all_prs.extend([pr.model_dump() if hasattr(pr, 'model_dump') else pr for pr in prs])
return all_prs
except Exception as e:
print(f"DEBUG: list_assigned_pull_requests error: {e}")
logger.error(f"Error listing assigned pull requests: {e}", exc_info=True)
return []
def list_pull_requests(self, owner: str, repo: str, state: str = "open") -> str: