AddUserProjectItem adds an issue or pull request item to a user owned project. GitHub API docs: https://docs.github.com/rest/projects/items?apiVersion=2022-11-28#add-item-to-user-owned-project meta:operation POST /users/{username}/projectsV2/{project_number}/items
(ctx context.Context, username string, projectNumber int, opts *AddProjectItemOptions)
| 652 | // |
| 653 | //meta:operation POST /users/{username}/projectsV2/{project_number}/items |
| 654 | func (s *ProjectsService) AddUserProjectItem(ctx context.Context, username string, projectNumber int, opts *AddProjectItemOptions) (*ProjectV2Item, *Response, error) { |
| 655 | u := fmt.Sprintf("users/%v/projectsV2/%v/items", username, projectNumber) |
| 656 | req, err := s.client.NewRequest(ctx, "POST", u, opts) |
| 657 | if err != nil { |
| 658 | return nil, nil, err |
| 659 | } |
| 660 | |
| 661 | var item *ProjectV2Item |
| 662 | resp, err := s.client.Do(req, &item) |
| 663 | if err != nil { |
| 664 | return nil, resp, err |
| 665 | } |
| 666 | |
| 667 | return item, resp, nil |
| 668 | } |
| 669 | |
| 670 | // GetUserProjectItem gets a single item from a user owned project. |
| 671 | // |