Skip to content

Commit

Permalink
Fix repository API to include private repos
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmo385 committed Jun 24, 2024
1 parent b8f86ee commit ab09468
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lazy_github/lib/github/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ async def _list(
sort: RepositorySortKey = "full_name",
direction: SortDirection = "asc",
page: int = 1,
per_page: int = 30,
per_page: int = 50,
) -> list[Repository]:
"""Retrieves Github repos matching the specified criteria"""
query_params = {"type": repo_types, "direction": direction, "sort": sort, "page": page, "per_page": per_page}
user = await client.user()
response = await client.get(
f"/users/{user.login}/repos", headers=client.headers_with_auth_accept(), params=query_params
)
response = await client.get("/user/repos", headers=client.headers_with_auth_accept(), params=query_params)
response.raise_for_status()
return [Repository(**r) for r in response.json()]


Expand Down

0 comments on commit ab09468

Please sign in to comment.