123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- package github
- import (
- "context"
- "fmt"
- "time"
- )
- type Timeline struct {
- ID *int64 `json:"id,omitempty"`
- URL *string `json:"url,omitempty"`
- CommitURL *string `json:"commit_url,omitempty"`
-
- Actor *User `json:"actor,omitempty"`
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Event *string `json:"event,omitempty"`
-
- CommitID *string `json:"commit_id,omitempty"`
-
- CreatedAt *time.Time `json:"created_at,omitempty"`
-
-
- Label *Label `json:"label,omitempty"`
-
-
- Assignee *User `json:"assignee,omitempty"`
-
-
- Milestone *Milestone `json:"milestone,omitempty"`
-
-
- Source *Source `json:"source,omitempty"`
-
-
- Rename *Rename `json:"rename,omitempty"`
- }
- type Source struct {
- ID *int64 `json:"id,omitempty"`
- URL *string `json:"url,omitempty"`
- Actor *User `json:"actor,omitempty"`
- }
- func (s *IssuesService) ListIssueTimeline(ctx context.Context, owner, repo string, number int, opt *ListOptions) ([]*Timeline, *Response, error) {
- u := fmt.Sprintf("repos/%v/%v/issues/%v/timeline", owner, repo, number)
- u, err := addOptions(u, opt)
- if err != nil {
- return nil, nil, err
- }
- req, err := s.client.NewRequest("GET", u, nil)
- if err != nil {
- return nil, nil, err
- }
-
- req.Header.Set("Accept", mediaTypeTimelinePreview)
- var events []*Timeline
- resp, err := s.client.Do(ctx, req, &events)
- return events, resp, err
- }
|