ListIssueEvents lists events for the specified issue. GitHub API docs: https://docs.github.com/rest/issues/events?apiVersion=2022-11-28#list-issue-events meta:operation GET /repos/{owner}/{repo}/issues/{issue_number}/events
(ctx context.Context, owner, repo string, number int, opts *ListOptions)
| 108 | // |
| 109 | //meta:operation GET /repos/{owner}/{repo}/issues/{issue_number}/events |
| 110 | func (s *IssuesService) ListIssueEvents(ctx context.Context, owner, repo string, number int, opts *ListOptions) ([]*IssueEvent, *Response, error) { |
| 111 | u := fmt.Sprintf("repos/%v/%v/issues/%v/events", owner, repo, number) |
| 112 | u, err := addOptions(u, opts) |
| 113 | if err != nil { |
| 114 | return nil, nil, err |
| 115 | } |
| 116 | |
| 117 | req, err := s.client.NewRequest(ctx, "GET", u, nil) |
| 118 | if err != nil { |
| 119 | return nil, nil, err |
| 120 | } |
| 121 | |
| 122 | req.Header.Set("Accept", mediaTypeProjectCardDetailsPreview) |
| 123 | |
| 124 | var events []*IssueEvent |
| 125 | resp, err := s.client.Do(req, &events) |
| 126 | if err != nil { |
| 127 | return nil, resp, err |
| 128 | } |
| 129 | |
| 130 | return events, resp, nil |
| 131 | } |
| 132 | |
| 133 | // ListRepositoryEvents lists events for the specified repository. |
| 134 | // |