From e7d7db48e7b7243da5687bf2e01570b2d48fc378 Mon Sep 17 00:00:00 2001 From: Paulo Date: Tue, 29 Sep 2026 17:28:58 +0200 Subject: [PATCH] Let the GitHub client react to a comment --- backend/druks/core/apis/github.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/druks/core/apis/github.py b/backend/druks/core/apis/github.py index ee0d45a7..a52d8896 100644 --- a/backend/druks/core/apis/github.py +++ b/backend/druks/core/apis/github.py @@ -356,6 +356,16 @@ async def create_comment(self, repo: str, issue_number: int, body: str) -> dict[ ) return response.parsed_data.model_dump() + @_retry_on_401 + async def create_reaction(self, repo: str, comment_id: int, content: str) -> None: + """React to a top-level comment. GitHub keeps one reaction per App and content, + so reacting again changes nothing.""" + owner, name = repo.split("/", 1) + github = await self._for_repo(repo) + await github.rest.reactions.async_create_for_issue_comment( + owner, name, comment_id, content=content + ) + @_retry_on_401 async def reply_to_review_comment( self, repo: str, pr_number: int, comment_id: int, body: str