Skip to content

Commit

Permalink
Enhance GitHubService to sort starred repositories by creation date
Browse files Browse the repository at this point in the history
- Updated the GitHubService to include sorting options for the list of repositories starred by the authenticated user.
- Added 'sort' parameter set to 'created' and 'direction' set to 'asc' for improved data retrieval.

These changes improve the functionality of the GitHubService by allowing users to view their starred repositories in chronological order.
  • Loading branch information
LuisReinoso committed Dec 16, 2024
1 parent c982a59 commit a4959a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/services/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export class GitHubService {
await this.octokit.activity.listReposStarredByAuthenticatedUser({
per_page: perPage,
page: page,
sort: 'created',
direction: 'asc',
});

const total = response.data.length;
Expand Down

0 comments on commit a4959a9

Please sign in to comment.