CreateIssueReaction creates a reaction for an issue. Note that if you have already created a reaction of type content, the previously created reaction will be returned with Status: 200 OK. The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray", "rocke
(ctx context.Context, owner, repo string, number int, content string)
| 172 | // |
| 173 | //meta:operation POST /repos/{owner}/{repo}/issues/{issue_number}/reactions |
| 174 | func (s *ReactionsService) CreateIssueReaction(ctx context.Context, owner, repo string, number int, content string) (*Reaction, *Response, error) { |
| 175 | u := fmt.Sprintf("repos/%v/%v/issues/%v/reactions", owner, repo, number) |
| 176 | |
| 177 | body := &Reaction{Content: &content} |
| 178 | req, err := s.client.NewRequest(ctx, "POST", u, body) |
| 179 | if err != nil { |
| 180 | return nil, nil, err |
| 181 | } |
| 182 | |
| 183 | req.Header.Set("Accept", mediaTypeReactionsPreview) |
| 184 | |
| 185 | var m *Reaction |
| 186 | resp, err := s.client.Do(req, &m) |
| 187 | if err != nil { |
| 188 | return nil, resp, err |
| 189 | } |
| 190 | |
| 191 | return m, resp, nil |
| 192 | } |
| 193 | |
| 194 | // DeleteIssueReaction deletes the reaction to an issue. |
| 195 | // |