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

[fix]:fix install repo is id bug #460

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions server/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ PeterCat 服务端,采用 FastAPI 框架开发。使用了 supabase 作为数
fastapi 最佳实践请参考 https://github.com/zhanymkanov/fastapi-best-practices


# 研发准备
- 安装 python3.10+,推荐使用 pyenv 管理 python 版本
- 安装 supabase CLI 工具 : https://supabase.com/docs/guides/cli/getting-started
- 安装 AWS CLI 工具 : https://docs.aws.amazon.com/zh_cn/cli/latest/userguide/install-cliv2.html
- 联系官方添加你的 AWS 账号,以便使用 AWS CLI 工具。
- 安装完成后控制台输入 `aws sso login` 登陆。

# 功能模块
## 存储
采用 [supabase](https://supabase.com) 作为数据库进行存储。
Expand Down
4 changes: 2 additions & 2 deletions server/github_app/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ def github_app_callback(code: str, installation_id: str, setup_action: str):
)
for repo in installed_repositories["repositories"]:
repository_config = RepositoryConfig(
owner_id=repo["owner"]["id"],
owner_id=str(repo["owner"]["id"]),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting owner_id to a string ensures consistent handling of IDs, which can prevent potential issues if the ID is expected to be a string elsewhere in the code.

repo_name=repo["full_name"],
repo_id=repo["id"],
repo_id=str(repo["id"]),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting repo_id to a string ensures consistent handling of IDs, which can prevent potential issues if the ID is expected to be a string elsewhere in the code.

robot_id="",
created_at=int(time.time()),
)
Expand Down