mirror of
https://github.com/documize/community.git
synced 2025-07-20 05:39:42 +02:00
go dep
Migrated from plain /vendor to go dep
This commit is contained in:
parent
0262763c95
commit
fd693f4ff4
957 changed files with 36866 additions and 177595 deletions
26
vendor/github.com/google/go-github/github/issues_events.go
generated
vendored
26
vendor/github.com/google/go-github/github/issues_events.go
generated
vendored
|
@ -6,19 +6,20 @@
|
|||
package github
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
// IssueEvent represents an event that occurred around an Issue or Pull Request.
|
||||
type IssueEvent struct {
|
||||
ID *int `json:"id,omitempty"`
|
||||
ID *int64 `json:"id,omitempty"`
|
||||
URL *string `json:"url,omitempty"`
|
||||
|
||||
// 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
|
||||
|
@ -43,7 +44,7 @@ type IssueEvent struct {
|
|||
// Someone unspecified @mentioned the Actor [sic] in an issue comment body.
|
||||
//
|
||||
// assigned, unassigned
|
||||
// The Actor assigned the issue to or removed the assignment from the Assignee.
|
||||
// The Assigner assigned the issue to or removed the assignment from the Assignee.
|
||||
//
|
||||
// labeled, unlabeled
|
||||
// The Actor added or removed the Label from the issue.
|
||||
|
@ -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 int64) (*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