Skip to content

Commit

Permalink
syncfork: fix repository listing
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
  • Loading branch information
katexochen committed Apr 30, 2024
1 parent fdc0aa1 commit cfa987d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/cmd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ func (c *githubClient) DeleteWorkflowRuns(ctx context.Context, runs []*github.Wo
}

func (c *githubClient) GetUserRepositories(ctx context.Context) ([]*github.Repository, error) {
opt := &github.RepositoryListByUserOptions{
opt := &github.RepositoryListByAuthenticatedUserOptions{
Affiliation: "owner",
ListOptions: github.ListOptions{PerPage: 1000},
}
var allRepos []*github.Repository
for {
repos, resp, err := c.client.Repositories.ListByUser(ctx, "", opt)
repos, resp, err := c.client.Repositories.ListByAuthenticatedUser(ctx, opt)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit cfa987d

Please sign in to comment.