mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Add public vs private info for repo list (#7937)
This commit is contained in:
parent
06fcf54475
commit
c18475ddc2
@ -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
|
||||
]
|
||||
|
||||
@ -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
|
||||
]
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user