From fa0f7a8cd2dd2a7751fc25fccf38dc236bbace35 Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Fri, 15 Dec 2017 17:52:22 -0800 Subject: [PATCH] Follow github changes after updating `go vet` fails due to github library changes:: k8s.io/test-infra/ghclient ghclient/core.go:60:14: cannot use client.Repositories (type *github.RepositoriesService) as type repositoryService in field value: *github.RepositoriesService does not implement repositoryService (wrong type for ListCollaborators method) have ListCollaborators(context.Context, string, string, *github.ListCollaboratorsOptions) ([]*github.User *github.Response, error) want ListCollaborators(context.Context, string, string, *github.ListOptions) ([]*github.User, *github.Response error) This patch makes ghclient follow these changes. --- ghclient/wrappers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghclient/wrappers.go b/ghclient/wrappers.go index a932e0187b5eb..3e4d381f00ed6 100644 --- a/ghclient/wrappers.go +++ b/ghclient/wrappers.go @@ -43,7 +43,7 @@ type pullRequestService interface { type repositoryService interface { CreateStatus(ctx context.Context, org, repo, ref string, status *github.RepoStatus) (*github.RepoStatus, *github.Response, error) GetCombinedStatus(ctx context.Context, org, repo, ref string, opt *github.ListOptions) (*github.CombinedStatus, *github.Response, error) - ListCollaborators(ctx context.Context, owner, repo string, opt *github.ListOptions) ([]*github.User, *github.Response, error) + ListCollaborators(ctx context.Context, owner, repo string, opt *github.ListCollaboratorsOptions) ([]*github.User, *github.Response, error) } type usersService interface { @@ -143,7 +143,7 @@ func (c *Client) ForEachPR(owner, repo string, opts *github.PullRequestListOptio // GetCollaborators returns all github users who are members or outside collaborators of the repo. func (c *Client) GetCollaborators(org, repo string) ([]*github.User, error) { - opts := &github.ListOptions{} + opts := &github.ListCollaboratorsOptions{} collaborators, err := c.depaginate( fmt.Sprintf("getting collaborators for '%s/%s'", org, repo), opts,