MCPcopy Index your code
hub / github.com/google/go-github / IsAssignee

Method IsAssignee

github/issues_assignees.go:45–55  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

43//
44//meta:operation GET /repos/{owner}/{repo}/assignees/{assignee}
45func (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//

Calls 3

parseBoolResponseFunction · 0.85
NewRequestMethod · 0.80
DoMethod · 0.45