Add public vs private info for repo list (#7937)

This commit is contained in:
Rohit Malhotra 2025-04-18 17:07:08 -04:00 committed by GitHub
parent 06fcf54475
commit c18475ddc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 0 deletions

View File

@ -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
]

View File

@ -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
]

View File

@ -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