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

Method ListIssueReactions

github/reactions.go:143–164  ·  view source on GitHub ↗

ListIssueReactions lists the reactions for an issue. GitHub API docs: https://docs.github.com/rest/reactions/reactions?apiVersion=2022-11-28#list-reactions-for-an-issue meta:operation GET /repos/{owner}/{repo}/issues/{issue_number}/reactions

(ctx context.Context, owner, repo string, number int, opts *ListReactionOptions)

Source from the content-addressed store, hash-verified

141//
142//meta:operation GET /repos/{owner}/{repo}/issues/{issue_number}/reactions
143func (s *ReactionsService) ListIssueReactions(ctx context.Context, owner, repo string, number int, opts *ListReactionOptions) ([]*Reaction, *Response, error) {
144 u := fmt.Sprintf("repos/%v/%v/issues/%v/reactions", owner, repo, number)
145 u, err := addOptions(u, opts)
146 if err != nil {
147 return nil, nil, err
148 }
149
150 req, err := s.client.NewRequest(ctx, "GET", u, nil)
151 if err != nil {
152 return nil, nil, err
153 }
154
155 req.Header.Set("Accept", mediaTypeReactionsPreview)
156
157 var m []*Reaction
158 resp, err := s.client.Do(req, &m)
159 if err != nil {
160 return nil, resp, err
161 }
162
163 return m, resp, nil
164}
165
166// CreateIssueReaction creates a reaction for an issue.
167// Note that if you have already created a reaction of type content, the

Calls 3

addOptionsFunction · 0.85
NewRequestMethod · 0.80
DoMethod · 0.45