Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
feat: Adds telemetry in repo fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
frgfm committed Oct 27, 2023
1 parent f1c20e0 commit f63c82b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/api/api_v1/endpoints/repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ async def fetch_repos(
user=Security(get_current_user, scopes=[UserScope.USER, UserScope.ADMIN]),
) -> List[Repository]:
entries = await repos.fetch_all() if user.scope == UserScope.ADMIN else await repos.fetch_all(("owner_id", user.id))
analytics_client.capture(user.id, event="repo-fetch")

Check warning on line 59 in src/app/api/api_v1/endpoints/repos.py

View check run for this annotation

Codecov / codecov/patch

src/app/api/api_v1/endpoints/repos.py#L59

Added line #L59 was not covered by tests
return [elt for elt in entries]


Expand Down

0 comments on commit f63c82b

Please sign in to comment.