GetOrganizationProject gets a Projects V2 project for an organization by ID. GitHub API docs: https://docs.github.com/rest/projects/projects?apiVersion=2022-11-28#get-project-for-organization meta:operation GET /orgs/{org}/projectsV2/{project_number}
(ctx context.Context, org string, projectNumber int)
| 305 | // |
| 306 | //meta:operation GET /orgs/{org}/projectsV2/{project_number} |
| 307 | func (s *ProjectsService) GetOrganizationProject(ctx context.Context, org string, projectNumber int) (*ProjectV2, *Response, error) { |
| 308 | u := fmt.Sprintf("orgs/%v/projectsV2/%v", org, projectNumber) |
| 309 | req, err := s.client.NewRequest(ctx, "GET", u, nil) |
| 310 | if err != nil { |
| 311 | return nil, nil, err |
| 312 | } |
| 313 | |
| 314 | var project *ProjectV2 |
| 315 | resp, err := s.client.Do(req, &project) |
| 316 | if err != nil { |
| 317 | return nil, resp, err |
| 318 | } |
| 319 | |
| 320 | return project, resp, nil |
| 321 | } |
| 322 | |
| 323 | // ListUserProjects lists Projects V2 for a user. |
| 324 | // |