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

Method ListAll

github/repos.go:483–501  ·  view source on GitHub ↗

ListAll lists all GitHub repositories in the order that they were created. GitHub API docs: https://docs.github.com/rest/repos/repos?apiVersion=2022-11-28#list-public-repositories meta:operation GET /repositories

(ctx context.Context, opts *RepositoryListAllOptions)

Source from the content-addressed store, hash-verified

481//
482//meta:operation GET /repositories
483func (s *RepositoriesService) ListAll(ctx context.Context, opts *RepositoryListAllOptions) ([]*Repository, *Response, error) {
484 u, err := addOptions("repositories", opts)
485 if err != nil {
486 return nil, nil, err
487 }
488
489 req, err := s.client.NewRequest(ctx, "GET", u, nil)
490 if err != nil {
491 return nil, nil, err
492 }
493
494 var repos []*Repository
495 resp, err := s.client.Do(req, &repos)
496 if err != nil {
497 return nil, resp, err
498 }
499
500 return repos, resp, nil
501}
502
503// createRepoRequest is a subset of Repository and is used internally
504// by Create to pass only the known fields for the endpoint.

Callers

nothing calls this directly

Calls 3

addOptionsFunction · 0.85
NewRequestMethod · 0.80
DoMethod · 0.45

Tested by

no test coverage detected