Handle pull request comments #89

Merged
Jmaa merged 4 commits from issue-70-handle-pull-request-comments into main 2025-04-23 06:55:08 +00:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit a4f7caf125 - Show all commits

View File

@ -78,10 +78,9 @@ import sys
import tempfile
from pathlib import Path
from .seen_issues_db import SeenIssuesDB
from . import secrets
from ._version import __version__ # noqa: F401
from .seen_issues_db import SeenIssuesDB
logger = logging.getLogger(__name__)

View File

@ -169,11 +169,13 @@ class GiteaClient:
response.raise_for_status()
return response.json()
def get_pull_request_comments(self, owner: str, repo: str, pr_number: str) -> list[dict]:
def get_pull_request_comments(
self, owner: str, repo: str, pr_number: str,
) -> list[dict]:
"""
Fetch comments for a pull request.
"""
url = f"{self.gitea_url}/repos/{owner}/{repo}/pulls/{pr_number}/comments"
url = f'{self.gitea_url}/repos/{owner}/{repo}/pulls/{pr_number}/comments'
response = self.session.get(url)
response.raise_for_status()
return response.json()