MCPcopy Index your code
hub / github.com/google/go-github / List

Method List

github/repos.go:292–312  ·  view source on GitHub ↗

List calls either RepositoriesService.ListByUser or RepositoriesService.ListByAuthenticatedUser depending on whether user is empty. Deprecated: Use RepositoriesService.ListByUser or RepositoriesService.ListByAuthenticatedUser instead. GitHub API docs: https://docs.github.com/rest/repos/repos?apiVe

(ctx context.Context, user string, opts *RepositoryListOptions)

Source from the content-addressed store, hash-verified

290//meta:operation GET /user/repos
291//meta:operation GET /users/{username}/repos
292func (s *RepositoriesService) List(ctx context.Context, user string, opts *RepositoryListOptions) ([]*Repository, *Response, error) {
293 if opts == nil {
294 opts = &RepositoryListOptions{}
295 }
296 if user != "" {
297 return s.ListByUser(ctx, user, &RepositoryListByUserOptions{
298 Type: opts.Type,
299 Sort: opts.Sort,
300 Direction: opts.Direction,
301 ListOptions: opts.ListOptions,
302 })
303 }
304 return s.ListByAuthenticatedUser(ctx, &RepositoryListByAuthenticatedUserOptions{
305 Visibility: opts.Visibility,
306 Affiliation: opts.Affiliation,
307 Type: opts.Type,
308 Sort: opts.Sort,
309 Direction: opts.Direction,
310 ListOptions: opts.ListOptions,
311 })
312}
313
314// RepositoryListByUserOptions specifies the optional parameters to the
315// RepositoriesService.ListByUser method.

Callers 1

ListIterMethod · 0.95

Calls 2

ListByUserMethod · 0.95

Tested by

no test coverage detected