Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: merge bot list query requests #596

Merged
merged 4 commits into from
Dec 18, 2024
Merged

Conversation

xingwanying
Copy link
Contributor

  • 重构 bots 查询接口,将空间机器人需要的多张表信息一次返回,减少空间页面额外的循环请求

Copy link

vercel bot commented Dec 18, 2024

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 Dec 18, 2024 9:41am

Copy link

Walkthrough

重构了 bots 查询接口,通过合并多张表的信息以减少循环请求。这一改动旨在优化空间页面的性能,减少不必要的请求。

Changes

文件 描述
client/app/factory/list/components/BotCard.tsx 修改了 BotInfoIconList 组件,移除了对 useGetBotBoundRepos 的调用,改为使用 github_installed 属性。
migrations/supabase/migrations/20241218093541_remote_schema.sql 创建了视图 bots_with_profiles_and_github 和函数 get_bots_with_profiles_and_github,用于合并 bots 和 profiles 表的信息。
server/bot/list.py 新增了 query_list 函数,用于查询 bots 信息,支持个人和公共查询。
server/bot/router.py 使用 query_list 函数替代了原有的查询逻辑,简化了代码。

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/bot/router.py 50.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
server/bot/router.py 17.50% <50.00%> (ø)

... and 2 files with indirect coverage changes

@ch-liuzhide ch-liuzhide merged commit f8206b7 into main Dec 18, 2024
5 checks passed
@ch-liuzhide ch-liuzhide deleted the refactor_factory_list branch December 18, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants