From a75253097b0a43f9cd6b136850c45b1152fecf7c Mon Sep 17 00:00:00 2001 From: Ori Kotek Date: Mon, 7 Aug 2023 16:28:20 +0300 Subject: [PATCH] Don't remove eyes --- pr_agent/servers/github_action_runner.py | 4 +--- pr_agent/servers/github_app.py | 4 +--- pr_agent/servers/github_polling.py | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/pr_agent/servers/github_action_runner.py b/pr_agent/servers/github_action_runner.py index 5c42527c..52e3b138 100644 --- a/pr_agent/servers/github_action_runner.py +++ b/pr_agent/servers/github_action_runner.py @@ -64,10 +64,8 @@ async def run_action(): body = comment_body.strip().lower() comment_id = event_payload.get("comment", {}).get("id") provider = get_git_provider()(pr_url=pr_url) - added_reaction = provider.add_eyes_reaction(comment_id) + provider.add_eyes_reaction(comment_id) await PRAgent().handle_request(pr_url, body) - if added_reaction: - provider.remove_reaction(comment_id, added_reaction) if __name__ == '__main__': diff --git a/pr_agent/servers/github_app.py b/pr_agent/servers/github_app.py index fe7fa354..1446b7e5 100644 --- a/pr_agent/servers/github_app.py +++ b/pr_agent/servers/github_app.py @@ -83,10 +83,8 @@ async def handle_request(body: Dict[str, Any]): api_url = pull_request.get("url") comment_id = body.get("comment", {}).get("id") provider = get_git_provider()(pr_url=api_url) - added_reaction = provider.add_eyes_reaction(comment_id) + provider.add_eyes_reaction(comment_id) await agent.handle_request(api_url, comment_body) - if added_reaction: - provider.remove_reaction(comment_id, added_reaction) elif action == "opened" or 'reopened' in action: diff --git a/pr_agent/servers/github_polling.py b/pr_agent/servers/github_polling.py index 007b3e9d..773b34f3 100644 --- a/pr_agent/servers/github_polling.py +++ b/pr_agent/servers/github_polling.py @@ -100,10 +100,8 @@ async def polling_loop(): rest_of_comment = comment_body.split(user_tag)[1].strip() comment_id = comment['id'] git_provider.set_pr(pr_url) - added_reaction = git_provider.add_eyes_reaction(comment_id) + git_provider.add_eyes_reaction(comment_id) success = await agent.handle_request(pr_url, rest_of_comment) - if added_reaction: - git_provider.remove_reaction(comment_id, added_reaction) if not success: git_provider.set_pr(pr_url) git_provider.publish_comment("### How to use PR-Agent\n" +