ListByAuthenticatedUser lists repositories for the authenticated user. GitHub API docs: https://docs.github.com/rest/repos/repos?apiVersion=2022-11-28#list-repositories-for-the-authenticated-user meta:operation GET /user/repos
(ctx context.Context, opts *RepositoryListByAuthenticatedUserOptions)
| 401 | // |
| 402 | //meta:operation GET /user/repos |
| 403 | func (s *RepositoriesService) ListByAuthenticatedUser(ctx context.Context, opts *RepositoryListByAuthenticatedUserOptions) ([]*Repository, *Response, error) { |
| 404 | u := "user/repos" |
| 405 | u, err := addOptions(u, opts) |
| 406 | if err != nil { |
| 407 | return nil, nil, err |
| 408 | } |
| 409 | |
| 410 | req, err := s.client.NewRequest(ctx, "GET", u, nil) |
| 411 | if err != nil { |
| 412 | return nil, nil, err |
| 413 | } |
| 414 | |
| 415 | var repos []*Repository |
| 416 | resp, err := s.client.Do(req, &repos) |
| 417 | if err != nil { |
| 418 | return nil, resp, err |
| 419 | } |
| 420 | |
| 421 | return repos, resp, nil |
| 422 | } |
| 423 | |
| 424 | // RepositoryListByOrgOptions specifies the optional parameters to the |
| 425 | // RepositoriesService.ListByOrg method. |