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: bot deploy #420

Closed ch-liuzhide closed 1 month ago

ch-liuzhide commented 1 month ago
  1. Support creating issues for publishing robots to the market, support creating issues for deploying robots to websites, and support binding robots to repositories. image

  2. image

vercel[bot] commented 1 month 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 Oct 11, 2024 6:39am
petercat-assistant[bot] commented 1 month ago

Walkthrough

This PR introduces features to support creating issues for publishing robots to the market, deploying robots to websites, and binding robots to repositories.

Changes

File Summary
client/.kiwi/en/DeployBotModal.ts Added English translations for deployment-related UI text.
client/.kiwi/en/edit.ts Added new translation key for 'Save and Deploy'.
client/.kiwi/en/index.ts Included DeployBotModal in the English index file.
client/.kiwi/ja/DeployBotModal.ts Added Japanese translations for deployment-related UI text.
client/.kiwi/ja/edit.ts Added new translation key for 'Save and Deploy'.
client/.kiwi/ja/index.ts Included DeployBotModal in the Japanese index file.
client/.kiwi/ko/DeployBotModal.ts Added Korean translations for deployment-related UI text.
client/.kiwi/ko/edit.ts Added new translation key for 'Save and Deploy'.
client/.kiwi/ko/index.ts Included DeployBotModal in the Korean index file.
client/.kiwi/zh-CN/DeployBotModal.ts Added Simplified Chinese translations for deployment-related UI text.
client/.kiwi/zh-CN/edit.ts Added new translation key for 'Save and Deploy'.
client/.kiwi/zh-CN/index.ts Included DeployBotModal in the Simplified Chinese index file.
client/.kiwi/zh-TW/DeployBotModal.ts Added Traditional Chinese translations for deployment-related UI text.
client/.kiwi/zh-TW/edit.ts Added new translation key for 'Save and Deploy'.
client/.kiwi/zh-TW/index.ts Included DeployBotModal in the Traditional Chinese index file.
client/app/contexts/BotContext.tsx Added domain_whitelist to the bot context.
client/app/factory/edit/components/DeployBotModal/DeployContent.tsx Created DeployContent component for deployment UI.
client/app/factory/edit/components/DeployBotModal/DeployItem.tsx Created DeployItem component for deployment UI.
client/app/factory/edit/components/DeployBotModal/index.tsx Created DeployBotModal component for deployment UI.
client/app/factory/edit/components/DeployBotModal/types.ts Defined types for deployment components.
client/app/factory/edit/components/DeployBotModal/utils.ts Added utility functions for deployment components.
client/app/factory/edit/page.tsx Integrated DeployBotModal into the bot edit page.
client/app/hooks/useBot.ts Added hooks for bot deployment and approval.
client/app/hooks/useUser.ts Minor formatting changes.
client/app/interface/index.ts Added domain_whitelist to the bot interface.
client/app/services/BotsController.ts Added API functions for bot deployment and approval.
client/public/icons/DeploySuccessIcon.tsx Added icon for deployment success.
client/public/icons/SaveSuccessIcon.tsx Added icon for save success.
client/types/database.types.ts Added domain_whitelist to the bot database schema.
server/auth/get_user_info.py Minor formatting changes.
server/bot/router.py Added API endpoints for bot deployment and approval.
server/core/dao/botApprovalDAO.py Created DAO for bot approval.
server/core/dao/repositoryConfigDAO.py Created DAO for repository configuration.
server/core/models/bot.py Added models for bot deployment.
server/core/models/bot_approval.py Added models for bot approval.
server/core/models/repository.py Added models for repository configuration.
server/core/type_class/bot.py Added request and response types for bot deployment.
server/event_handler/issue.py Minor formatting changes.
server/github_app/router.py Added API endpoints for GitHub app integration.
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 33.92857% with 148 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/bot/router.py 17.70% 79 Missing :warning:
server/github_app/router.py 14.28% 36 Missing :warning:
server/core/dao/botApprovalDAO.py 33.33% 18 Missing :warning:
server/auth/get_user_info.py 12.50% 7 Missing :warning:
server/core/dao/repositoryConfigDAO.py 50.00% 4 Missing :warning:
server/core/models/bot_approval.py 88.46% 3 Missing :warning:
server/core/models/repository.py 83.33% 1 Missing :warning:
Files with missing lines Coverage Δ
server/core/models/bot.py 100.00% <100.00%> (ø)
server/core/type_class/bot.py 100.00% <100.00%> (ø)
server/event_handler/issue.py 29.41% <ø> (ø)
server/core/models/repository.py 92.30% <83.33%> (-7.70%) :arrow_down:
server/core/models/bot_approval.py 88.46% <88.46%> (ø)
server/core/dao/repositoryConfigDAO.py 38.23% <50.00%> (+1.19%) :arrow_up:
server/auth/get_user_info.py 26.41% <12.50%> (ø)
server/core/dao/botApprovalDAO.py 33.33% <33.33%> (ø)
server/github_app/router.py 35.95% <14.28%> (-4.90%) :arrow_down:
server/bot/router.py 20.10% <17.70%> (-4.34%) :arrow_down:

... and 7 files with indirect coverage changes

xingwanying commented 1 month ago

image