1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-11-23 21:44:44 +02:00

Update module github.com/google/go-github/v56 to v57 (#2899)

This commit is contained in:
renovate[bot]
2023-12-02 15:19:39 +01:00
committed by GitHub
parent 1caccdc977
commit 621eed6205
6 changed files with 12 additions and 23 deletions

View File

@@ -25,7 +25,7 @@ import (
"strconv"
"strings"
"github.com/google/go-github/v56/github"
"github.com/google/go-github/v57/github"
"github.com/rs/zerolog/log"
"golang.org/x/oauth2"
@@ -199,13 +199,13 @@ func (c *client) Repo(ctx context.Context, u *model.User, id model.ForgeRemoteID
func (c *client) Repos(ctx context.Context, u *model.User) ([]*model.Repo, error) {
client := c.newClientToken(ctx, u.Token)
opts := new(github.RepositoryListOptions)
opts := new(github.RepositoryListByAuthenticatedUserOptions)
opts.PerPage = 100
opts.Page = 1
var repos []*model.Repo
for opts.Page > 0 {
list, resp, err := client.Repositories.List(ctx, "", opts)
list, resp, err := client.Repositories.ListByAuthenticatedUser(ctx, opts)
if err != nil {
return nil, err
}