IsAssignee checks if a user is an assignee for the specified repository. GitHub API docs: https://docs.github.com/rest/issues/assignees?apiVersion=2022-11-28#check-if-a-user-can-be-assigned meta:operation GET /repos/{owner}/{repo}/assignees/{assignee}
(ctx context.Context, owner, repo, user string)
| 43 | // |
| 44 | //meta:operation GET /repos/{owner}/{repo}/assignees/{assignee} |
| 45 | func (s *IssuesService) IsAssignee(ctx context.Context, owner, repo, user string) (bool, *Response, error) { |
| 46 | u := fmt.Sprintf("repos/%v/%v/assignees/%v", owner, repo, user) |
| 47 | req, err := s.client.NewRequest(ctx, "GET", u, nil) |
| 48 | if err != nil { |
| 49 | return false, nil, err |
| 50 | } |
| 51 | |
| 52 | resp, err := s.client.Do(req, nil) |
| 53 | assignee, err := parseBoolResponse(err) |
| 54 | return assignee, resp, err |
| 55 | } |
| 56 | |
| 57 | // AddAssignees adds the provided GitHub users as assignees to the issue. |
| 58 | // |