From c18475ddc2ecc70e810dbea75f0a9bbf992c90c1 Mon Sep 17 00:00:00 2001 From: Rohit Malhotra Date: Fri, 18 Apr 2025 17:07:08 -0400 Subject: [PATCH] Add public vs private info for repo list (#7937) --- openhands/integrations/github/github_service.py | 1 + openhands/integrations/gitlab/gitlab_service.py | 1 + openhands/integrations/service_types.py | 1 + 3 files changed, 3 insertions(+) diff --git a/openhands/integrations/github/github_service.py b/openhands/integrations/github/github_service.py index c91865039b..761f310ca5 100644 --- a/openhands/integrations/github/github_service.py +++ b/openhands/integrations/github/github_service.py @@ -179,6 +179,7 @@ class GitHubService(GitService): full_name=repo.get('full_name'), stargazers_count=repo.get('stargazers_count'), git_provider=ProviderType.GITHUB, + is_public=not repo.get('private', True) ) for repo in all_repos ] diff --git a/openhands/integrations/gitlab/gitlab_service.py b/openhands/integrations/gitlab/gitlab_service.py index 26bac72dd8..d265872ff1 100644 --- a/openhands/integrations/gitlab/gitlab_service.py +++ b/openhands/integrations/gitlab/gitlab_service.py @@ -225,6 +225,7 @@ class GitLabService(GitService): full_name=repo.get('path_with_namespace'), stargazers_count=repo.get('star_count'), git_provider=ProviderType.GITLAB, + is_public = repo.get('visibility') == 'public' ) for repo in all_repos ] diff --git a/openhands/integrations/service_types.py b/openhands/integrations/service_types.py index fdb5a5339b..026ebfcb2a 100644 --- a/openhands/integrations/service_types.py +++ b/openhands/integrations/service_types.py @@ -39,6 +39,7 @@ class Repository(BaseModel): id: int full_name: str git_provider: ProviderType + is_public: bool stargazers_count: int | None = None link_header: str | None = None pushed_at: str | None = None # ISO 8601 format date string