Fix weird url for getting comments #100

Closed
Jmaa wants to merge 1 commits from issue-99-fix-weird-url-for-getting-comments into main

View File

@ -178,6 +178,8 @@ class GiteaClient:
"""
Fetch comments for a pull request.
"""
# sanitize pr_number to ensure it's just the numeric ID, not a full URL
pr_number = pr_number.rstrip('/').split('/')[-1]
url = f'{self.gitea_url}/repos/{owner}/{repo}/pulls/{pr_number}/comments'
response = self.session.get(url)
response.raise_for_status()