Fetch a comment by ID to verify ownership.
(self, comment_id: int)
| 323 | return {"success": False, "error": str(e)} |
| 324 | |
| 325 | async def _get_comment(self, comment_id: int) -> dict | None: |
| 326 | """Fetch a comment by ID to verify ownership.""" |
| 327 | url = f"https://api.github.com/repos/{config.github_repo}/issues/comments/{comment_id}" |
| 328 | try: |
| 329 | session = await self.get_session() |
| 330 | async with session.get( |
| 331 | url, |
| 332 | headers=await self._get_headers(), |
| 333 | timeout=aiohttp.ClientTimeout(total=10), |
| 334 | ) as response: |
| 335 | if response.status == 200: |
| 336 | return await response.json() |
| 337 | return None |
| 338 | except Exception: |
| 339 | return None |
| 340 | |
| 341 | def _verify_comment_ownership(self, comment_body: str, requester: str) -> bool: |
| 342 |
no test coverage detected