MCPcopy Create free account
hub / github.com/pollinations/pollinations / _get_comment

Method _get_comment

apps/polly/src/services/github.py:325–339  ·  view source on GitHub ↗

Fetch a comment by ID to verify ownership.

(self, comment_id: int)

Source from the content-addressed store, hash-verified

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

Callers 2

edit_commentMethod · 0.95
delete_commentMethod · 0.95

Calls 4

get_sessionMethod · 0.95
_get_headersMethod · 0.95
jsonMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected