mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-02 20:00:41 +08:00
Support adding / removing reaction from comments in GitHub different servers
This commit is contained in:
@ -98,8 +98,12 @@ async def polling_loop():
|
||||
if user_tag not in comment_body:
|
||||
continue
|
||||
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)
|
||||
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" +
|
||||
|
Reference in New Issue
Block a user