From 62c42257a729908e8d2334e7fa32abee735293a5 Mon Sep 17 00:00:00 2001 From: David May <49894298+wass3rw3rk@users.noreply.github.com> Date: Tue, 18 Jun 2024 13:25:27 -0500 Subject: [PATCH] fix(scm): avoid usage of deprecated method in github module (#1146) --- scm/github/repo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scm/github/repo.go b/scm/github/repo.go index 6af6cdd5a..c3b7ab7c9 100644 --- a/scm/github/repo.go +++ b/scm/github/repo.go @@ -515,14 +515,14 @@ func (c *client) ListUserRepos(ctx context.Context, u *api.User) ([]*api.Repo, e f := []*api.Repo{} // set the max per page for the options to capture the list of repos - opts := &github.RepositoryListOptions{ + opts := &github.RepositoryListByAuthenticatedUserOptions{ ListOptions: github.ListOptions{PerPage: 100}, // 100 is max } // loop to capture *ALL* the repos for { // send API call to capture the user's repos - repos, resp, err := client.Repositories.List(ctx, "", opts) + repos, resp, err := client.Repositories.ListByAuthenticatedUser(ctx, opts) if err != nil { return nil, fmt.Errorf("unable to list user repos: %w", err) }