petercat-ai / petercat

A conversational Q&A agent configuration system, self-hosted deployment solutions, and a convenient all-in-one application SDK, allowing you to create intelligent Q&A bots for your GitHub repositories
https://petercat.ai
MIT License
605 stars 17 forks source link

feat: enable to support discussion_comment #407

Closed xingwanying closed 2 months ago

xingwanying commented 2 months ago

响应 discussion.comment

image

末尾附上联系方式 image

close #405

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 24, 2024 4:55am
petercat-assistant[bot] commented 2 months ago

Walkthrough

此 PR 增加了对 discussion_comment 事件的支持,旨在响应和处理讨论评论。

Changes

文件 描述
server/agent/prompts/issue_helper.py 修改了 issue_number 的处理逻辑,增加了更详细的注释。
server/core/dao/repositoryConfigDAO.py 重构了数据库操作代码,使其更具可读性。
server/event_handler/discussion.py 增加了 DiscussionCommentEventHandler 类,用于处理讨论评论事件。
server/event_handler/issue.py 修改了 issue 事件处理逻辑,增加了对 edited 事件的支持。
server/github_app/handlers.py 增加了对 DiscussionCommentEventHandler 的引用和处理。
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 12.06897% with 51 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/event_handler/discussion.py 11.32% 47 Missing :warning:
server/core/dao/repositoryConfigDAO.py 0.00% 3 Missing :warning:
server/event_handler/issue.py 0.00% 1 Missing :warning:
Files with missing lines Coverage Δ
server/agent/prompts/bot_template.py 66.66% <ø> (ø)
server/agent/prompts/issue_helper.py 66.66% <ø> (ø)
server/github_app/handlers.py 80.00% <100.00%> (ø)
server/event_handler/issue.py 29.41% <0.00%> (ø)
server/core/dao/repositoryConfigDAO.py 37.03% <0.00%> (ø)
server/event_handler/discussion.py 20.83% <11.32%> (-7.11%) :arrow_down: