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

Code before:
// ListAllIssuesOptions specifies the optional parameters to the
// IssuesService.ListAllIssues method.
type ListAllIssuesOptions struct {
	// Filter specifies which issues to list. Possible values are: assigned,
	// created, mentioned, subscribed, all. Default is "assigned".
	Filter string `url:"filter,omitempty"`

	// State filters issues based on their state. Possible values are: open,
	// closed, all. Default is "open".
	State string `url:"state,omitempty"`

	// Labels filters issues based on their label.
	Labels []string `url:"labels,comma,omitempty"`

	// Sort specifies how to sort issues. Possible values are: created, updated,
	// and comments. Default value is "created".
	Sort string `url:"sort,omitempty"`

	// Direction in which to sort issues. Possible values are: asc, desc.
	// Default is "desc".
	Direction string `url:"direction,omitempty"`

	// Since filters issues by time.
	Since time.Time `url:"since,omitempty"`

	// These options are undocumented in the GitHub API.
	Collab bool `url:"collab,omitempty"`
	Orgs   bool `url:"orgs,omitempty"`
	Owned  bool `url:"owned,omitempty"`
	Pulls  bool `url:"pulls,omitempty"`

	ListOptions
}

// ListAllIssues gets issues assigned to the authenticated user across all visible repositories including owned repositories,
// member repositories, and organization repositories.
// You can use the filter query parameter to fetch issues that are not necessarily assigned to you.
//
// GitHub API docs: https://docs.github.com/rest/issues/issues#list-issues-assigned-to-the-authenticated-user
//
//meta:operation GET /issues
func (s *IssuesService) ListAllIssues(ctx context.Context, opts *ListAllIssuesOptions) ([]*Issue, *Response, error) {
	u := "issues"
	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

Review comment (security):
These options are documented in the GitHub API [docs](https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#list-issues-assigned-to-the-authenticated-user)
why comment says `These options are undocumented in the GitHub API.`

<img width="598" height="711" alt="Image" src="https://github.com/user-attachments/assets/94023701-41f4-4210-ba49-2ec63cc35bec" />

Code after:
// ListAllIssuesOptions specifies the optional parameters to the
// IssuesService.ListAllIssues method.
type ListAllIssuesOptions struct {
	// Filter specifies which issues to list. Possible values are: assigned,
	// created, mentioned, subscribed, repos, all. Default is "assigned".
	Filter string `url:"filter,omitempty"`

	// State filters issues based on their state. Possible values are: open,
	// closed, all. Default is "open".
	State string `url:"state,omitempty"`

	// Labels filters issues based on their label.
	Labels []string `url:"labels,comma,omitempty"`

	// Sort specifies how to sort issues. Possible values are: created, updated,
	// and comments. Default value is "created".
	Sort string `url:"sort,omitempty"`

	// Direction in which to sort issues. Possible values are: asc, desc.
	// Default is "desc".
	Direction string `url:"direction,omitempty"`

	// Since filters issues by time.
	Since time.Time `url:"since,omitempty"`

	Collab bool `url:"collab,omitempty"`
	Orgs   bool `url:"orgs,omitempty"`
	Owned  bool `url:"owned,omitempty"`
	Pulls  bool `url:"pulls,omitempty"`

	ListOptions
}

// ListAllIssues gets issues assigned to the authenticated user across all visible repositories including owned repositories,
// member repositories, and organization repositories.
// You can use the filter query parameter to fetch issues that are not necessarily assigned to you.
//
// GitHub API docs: https://docs.github.com/rest/issues/issues#list-issues-assigned-to-the-authenticated-user
//
//meta:operation GET /issues
func (s *IssuesService) ListAllIssues(ctx context.Context, opts *ListAllIssuesOptions) ([]*Issue, *Response, error) {
	u := "issues"
	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
	}