You've already forked woodpecker
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user