Merge v1.2.1-master
Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
parent
a590155b0b
commit
aeb17182b4
396 changed files with 27271 additions and 9969 deletions
22
vendor/github.com/google/go-github/github/issues_events.go
generated
vendored
22
vendor/github.com/google/go-github/github/issues_events.go
generated
vendored
|
@ -6,6 +6,7 @@
|
|||
package github
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
@ -18,7 +19,7 @@ type IssueEvent struct {
|
|||
// The User that generated this event.
|
||||
Actor *User `json:"actor,omitempty"`
|
||||
|
||||
// Event identifies the actual type of Event that occurred. Possible
|
||||
// Event identifies the actual type of Event that occurred. Possible
|
||||
// values are:
|
||||
//
|
||||
// closed
|
||||
|
@ -64,6 +65,7 @@ type IssueEvent struct {
|
|||
|
||||
// Only present on certain events; see above.
|
||||
Assignee *User `json:"assignee,omitempty"`
|
||||
Assigner *User `json:"assigner,omitempty"`
|
||||
CommitID *string `json:"commit_id,omitempty"`
|
||||
Milestone *Milestone `json:"milestone,omitempty"`
|
||||
Label *Label `json:"label,omitempty"`
|
||||
|
@ -73,7 +75,7 @@ type IssueEvent struct {
|
|||
// ListIssueEvents lists events for the specified issue.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/issues/events/#list-events-for-an-issue
|
||||
func (s *IssuesService) ListIssueEvents(owner, repo string, number int, opt *ListOptions) ([]*IssueEvent, *Response, error) {
|
||||
func (s *IssuesService) ListIssueEvents(ctx context.Context, owner, repo string, number int, opt *ListOptions) ([]*IssueEvent, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%v/%v/issues/%v/events", owner, repo, number)
|
||||
u, err := addOptions(u, opt)
|
||||
if err != nil {
|
||||
|
@ -86,18 +88,18 @@ func (s *IssuesService) ListIssueEvents(owner, repo string, number int, opt *Lis
|
|||
}
|
||||
|
||||
var events []*IssueEvent
|
||||
resp, err := s.client.Do(req, &events)
|
||||
resp, err := s.client.Do(ctx, req, &events)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return events, resp, err
|
||||
return events, resp, nil
|
||||
}
|
||||
|
||||
// ListRepositoryEvents lists events for the specified repository.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/issues/events/#list-events-for-a-repository
|
||||
func (s *IssuesService) ListRepositoryEvents(owner, repo string, opt *ListOptions) ([]*IssueEvent, *Response, error) {
|
||||
func (s *IssuesService) ListRepositoryEvents(ctx context.Context, owner, repo string, opt *ListOptions) ([]*IssueEvent, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%v/%v/issues/events", owner, repo)
|
||||
u, err := addOptions(u, opt)
|
||||
if err != nil {
|
||||
|
@ -110,18 +112,18 @@ func (s *IssuesService) ListRepositoryEvents(owner, repo string, opt *ListOption
|
|||
}
|
||||
|
||||
var events []*IssueEvent
|
||||
resp, err := s.client.Do(req, &events)
|
||||
resp, err := s.client.Do(ctx, req, &events)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return events, resp, err
|
||||
return events, resp, nil
|
||||
}
|
||||
|
||||
// GetEvent returns the specified issue event.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/issues/events/#get-a-single-event
|
||||
func (s *IssuesService) GetEvent(owner, repo string, id int) (*IssueEvent, *Response, error) {
|
||||
func (s *IssuesService) GetEvent(ctx context.Context, owner, repo string, id int) (*IssueEvent, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%v/%v/issues/events/%v", owner, repo, id)
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, nil)
|
||||
|
@ -130,12 +132,12 @@ func (s *IssuesService) GetEvent(owner, repo string, id int) (*IssueEvent, *Resp
|
|||
}
|
||||
|
||||
event := new(IssueEvent)
|
||||
resp, err := s.client.Do(req, event)
|
||||
resp, err := s.client.Do(ctx, req, event)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return event, resp, err
|
||||
return event, resp, nil
|
||||
}
|
||||
|
||||
// Rename contains details for 'renamed' events.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue