From ec71a9a551801a1c17def061ae8bda1f20cea55b Mon Sep 17 00:00:00 2001 From: ch-liuzhide Date: Mon, 2 Dec 2024 15:25:49 +0800 Subject: [PATCH] revert(get_user_repos_installed_app): revert get user repo function --- server/github_app/router.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/github_app/router.py b/server/github_app/router.py index d91a2860..c2e0211d 100644 --- a/server/github_app/router.py +++ b/server/github_app/router.py @@ -131,7 +131,7 @@ async def github_app_webhook( @router.get("/user/repos_installed_app") -def get_user_repos_installed_app_( +def get_user_repos_installed_app( user: Annotated[User | None, Depends(get_user)] = None ): """ @@ -146,7 +146,7 @@ def get_user_repos_installed_app_( auth = Auth.Token(token=user.access_token) g = Github(auth=auth) github_user = g.get_user() - orgs = get_user_orgs(github_user.login, auth.token) + orgs = github_user.get_orgs() repository_config_dao = RepositoryConfigDAO() installations = repository_config_dao.query_by_owners( [org.id for org in orgs] + [github_user.id]