ListOrganizationProjects lists Projects V2 for an organization. GitHub API docs: https://docs.github.com/rest/projects/projects?apiVersion=2022-11-28#list-projects-for-organization meta:operation GET /orgs/{org}/projectsV2
(ctx context.Context, org string, opts *ListProjectsOptions)
| 279 | // |
| 280 | //meta:operation GET /orgs/{org}/projectsV2 |
| 281 | func (s *ProjectsService) ListOrganizationProjects(ctx context.Context, org string, opts *ListProjectsOptions) ([]*ProjectV2, *Response, error) { |
| 282 | u := fmt.Sprintf("orgs/%v/projectsV2", org) |
| 283 | u, err := addOptions(u, opts) |
| 284 | if err != nil { |
| 285 | return nil, nil, err |
| 286 | } |
| 287 | |
| 288 | req, err := s.client.NewRequest(ctx, "GET", u, nil) |
| 289 | if err != nil { |
| 290 | return nil, nil, err |
| 291 | } |
| 292 | |
| 293 | var projects []*ProjectV2 |
| 294 | resp, err := s.client.Do(req, &projects) |
| 295 | if err != nil { |
| 296 | return nil, resp, err |
| 297 | } |
| 298 | |
| 299 | return projects, resp, nil |
| 300 | } |
| 301 | |
| 302 | // GetOrganizationProject gets a Projects V2 project for an organization by ID. |
| 303 | // |