Repository: google/go-github
File: github/reactions.go (Go)

Code before:
// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", or "eyes".
//
// GitHub API docs: https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-release
//
//meta:operation POST /repos/{owner}/{repo}/releases/{release_id}/reactions
func (s *ReactionsService) CreateReleaseReaction(ctx context.Context, owner, repo string, releaseID int64, content string) (*Reaction, *Response, error) {
	u := fmt.Sprintf("repos/%v/%v/releases/%v/reactions", owner, repo, releaseID)

	body := &Reaction{Content: Ptr(content)}
	req, err := s.client.NewRequest("POST", u, body)
	if err != nil {
		return nil, nil, err
	}

	req.Header.Set("Accept", mediaTypeReactionsPreview)

	m := &Reaction{}
	resp, err := s.client.Do(ctx, req, m)
	if err != nil {
		return nil, resp, err
	}

	return m, resp, nil
}

// ListReleaseReactions lists the reactions for an release.
//
// GitHub API docs: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-release
//
//meta:operation GET /repos/{owner}/{repo}/releases/{release_id}/reactions
func (s *ReactionsService) ListReleaseReactions(ctx context.Context, owner, repo string, releaseID int64, opts *ListReactionOptions) ([]*Reaction, *Response, error) {
	u := fmt.Sprintf("repos/%v/%v/releases/%v/reactions", owner, repo, releaseID)
	u, err := addOptions(u, opts)
	if err != nil {
		return nil, nil, err
	}

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	// TODO: remove custom Accept headers when APIs fully launch.
	req.Header.Set("Accept", mediaTypeReactionsPreview)

	var m []*Reaction
	resp, err := s.client.Do(ctx, req, &m)
	if err != nil {
		return nil, resp, err
	}


Review comment (suggestion):
```suggestion
// ListReleaseReactions lists the reactions for a release.
```

Code after:
// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", or "eyes".
//
// GitHub API docs: https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-release
//
//meta:operation POST /repos/{owner}/{repo}/releases/{release_id}/reactions
func (s *ReactionsService) CreateReleaseReaction(ctx context.Context, owner, repo string, releaseID int64, content string) (*Reaction, *Response, error) {
	u := fmt.Sprintf("repos/%v/%v/releases/%v/reactions", owner, repo, releaseID)

	body := &Reaction{Content: Ptr(content)}
	req, err := s.client.NewRequest("POST", u, body)
	if err != nil {
		return nil, nil, err
	}

	req.Header.Set("Accept", mediaTypeReactionsPreview)

	m := &Reaction{}
	resp, err := s.client.Do(ctx, req, m)
	if err != nil {
		return nil, resp, err
	}

	return m, resp, nil
}

// ListReleaseReactions lists the reactions for a release.
//
// GitHub API docs: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-release
//
//meta:operation GET /repos/{owner}/{repo}/releases/{release_id}/reactions
func (s *ReactionsService) ListReleaseReactions(ctx context.Context, owner, repo string, releaseID int64, opts *ListReactionOptions) ([]*Reaction, *Response, error) {
	u := fmt.Sprintf("repos/%v/%v/releases/%v/reactions", owner, repo, releaseID)
	u, err := addOptions(u, opts)
	if err != nil {
		return nil, nil, err
	}

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	// TODO: remove custom Accept headers when APIs fully launch.
	req.Header.Set("Accept", mediaTypeReactionsPreview)

	var m []*Reaction
	resp, err := s.client.Do(ctx, req, &m)
	if err != nil {
		return nil, resp, err
	}