mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-26 23:05:11 +00:00
Update deps
This commit is contained in:
51
vendor/github.com/google/go-github/github/activity_events.go
generated
vendored
51
vendor/github.com/google/go-github/github/activity_events.go
generated
vendored
@@ -6,6 +6,7 @@
|
||||
package github
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
@@ -49,8 +50,6 @@ func (e *Event) Payload() (payload interface{}) {
|
||||
payload = &IntegrationInstallationEvent{}
|
||||
case "IntegrationInstallationRepositoriesEvent":
|
||||
payload = &IntegrationInstallationRepositoriesEvent{}
|
||||
case "IssueActivityEvent":
|
||||
payload = &IssueActivityEvent{}
|
||||
case "IssueCommentEvent":
|
||||
payload = &IssueCommentEvent{}
|
||||
case "IssuesEvent":
|
||||
@@ -98,8 +97,8 @@ func (e *Event) Payload() (payload interface{}) {
|
||||
|
||||
// ListEvents drinks from the firehose of all public events across GitHub.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events
|
||||
func (s *ActivityService) ListEvents(opt *ListOptions) ([]*Event, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events
|
||||
func (s *ActivityService) ListEvents(ctx context.Context, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
u, err := addOptions("events", opt)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
@@ -111,7 +110,7 @@ func (s *ActivityService) ListEvents(opt *ListOptions) ([]*Event, *Response, err
|
||||
}
|
||||
|
||||
var events []*Event
|
||||
resp, err := s.client.Do(req, &events)
|
||||
resp, err := s.client.Do(ctx, req, &events)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
@@ -121,8 +120,8 @@ func (s *ActivityService) ListEvents(opt *ListOptions) ([]*Event, *Response, err
|
||||
|
||||
// ListRepositoryEvents lists events for a repository.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-repository-events
|
||||
func (s *ActivityService) ListRepositoryEvents(owner, repo string, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-repository-events
|
||||
func (s *ActivityService) ListRepositoryEvents(ctx context.Context, owner, repo string, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%v/%v/events", owner, repo)
|
||||
u, err := addOptions(u, opt)
|
||||
if err != nil {
|
||||
@@ -135,7 +134,7 @@ func (s *ActivityService) ListRepositoryEvents(owner, repo string, opt *ListOpti
|
||||
}
|
||||
|
||||
var events []*Event
|
||||
resp, err := s.client.Do(req, &events)
|
||||
resp, err := s.client.Do(ctx, req, &events)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
@@ -145,8 +144,8 @@ func (s *ActivityService) ListRepositoryEvents(owner, repo string, opt *ListOpti
|
||||
|
||||
// ListIssueEventsForRepository lists issue events for a repository.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
|
||||
func (s *ActivityService) ListIssueEventsForRepository(owner, repo string, opt *ListOptions) ([]*IssueEvent, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
|
||||
func (s *ActivityService) ListIssueEventsForRepository(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 {
|
||||
@@ -159,7 +158,7 @@ func (s *ActivityService) ListIssueEventsForRepository(owner, repo string, opt *
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
@@ -169,8 +168,8 @@ func (s *ActivityService) ListIssueEventsForRepository(owner, repo string, opt *
|
||||
|
||||
// ListEventsForRepoNetwork lists public events for a network of repositories.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories
|
||||
func (s *ActivityService) ListEventsForRepoNetwork(owner, repo string, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories
|
||||
func (s *ActivityService) ListEventsForRepoNetwork(ctx context.Context, owner, repo string, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
u := fmt.Sprintf("networks/%v/%v/events", owner, repo)
|
||||
u, err := addOptions(u, opt)
|
||||
if err != nil {
|
||||
@@ -183,7 +182,7 @@ func (s *ActivityService) ListEventsForRepoNetwork(owner, repo string, opt *List
|
||||
}
|
||||
|
||||
var events []*Event
|
||||
resp, err := s.client.Do(req, &events)
|
||||
resp, err := s.client.Do(ctx, req, &events)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
@@ -193,8 +192,8 @@ func (s *ActivityService) ListEventsForRepoNetwork(owner, repo string, opt *List
|
||||
|
||||
// ListEventsForOrganization lists public events for an organization.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
|
||||
func (s *ActivityService) ListEventsForOrganization(org string, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
|
||||
func (s *ActivityService) ListEventsForOrganization(ctx context.Context, org string, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
u := fmt.Sprintf("orgs/%v/events", org)
|
||||
u, err := addOptions(u, opt)
|
||||
if err != nil {
|
||||
@@ -207,7 +206,7 @@ func (s *ActivityService) ListEventsForOrganization(org string, opt *ListOptions
|
||||
}
|
||||
|
||||
var events []*Event
|
||||
resp, err := s.client.Do(req, &events)
|
||||
resp, err := s.client.Do(ctx, req, &events)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
@@ -218,8 +217,8 @@ func (s *ActivityService) ListEventsForOrganization(org string, opt *ListOptions
|
||||
// ListEventsPerformedByUser lists the events performed by a user. If publicOnly is
|
||||
// true, only public events will be returned.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
|
||||
func (s *ActivityService) ListEventsPerformedByUser(user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
|
||||
func (s *ActivityService) ListEventsPerformedByUser(ctx context.Context, user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
var u string
|
||||
if publicOnly {
|
||||
u = fmt.Sprintf("users/%v/events/public", user)
|
||||
@@ -237,7 +236,7 @@ func (s *ActivityService) ListEventsPerformedByUser(user string, publicOnly bool
|
||||
}
|
||||
|
||||
var events []*Event
|
||||
resp, err := s.client.Do(req, &events)
|
||||
resp, err := s.client.Do(ctx, req, &events)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
@@ -248,8 +247,8 @@ func (s *ActivityService) ListEventsPerformedByUser(user string, publicOnly bool
|
||||
// ListEventsReceivedByUser lists the events received by a user. If publicOnly is
|
||||
// true, only public events will be returned.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
|
||||
func (s *ActivityService) ListEventsReceivedByUser(user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
|
||||
func (s *ActivityService) ListEventsReceivedByUser(ctx context.Context, user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
var u string
|
||||
if publicOnly {
|
||||
u = fmt.Sprintf("users/%v/received_events/public", user)
|
||||
@@ -267,7 +266,7 @@ func (s *ActivityService) ListEventsReceivedByUser(user string, publicOnly bool,
|
||||
}
|
||||
|
||||
var events []*Event
|
||||
resp, err := s.client.Do(req, &events)
|
||||
resp, err := s.client.Do(ctx, req, &events)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
@@ -278,8 +277,8 @@ func (s *ActivityService) ListEventsReceivedByUser(user string, publicOnly bool,
|
||||
// ListUserEventsForOrganization provides the user’s organization dashboard. You
|
||||
// must be authenticated as the user to view this.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-for-an-organization
|
||||
func (s *ActivityService) ListUserEventsForOrganization(org, user string, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-for-an-organization
|
||||
func (s *ActivityService) ListUserEventsForOrganization(ctx context.Context, org, user string, opt *ListOptions) ([]*Event, *Response, error) {
|
||||
u := fmt.Sprintf("users/%v/events/orgs/%v", user, org)
|
||||
u, err := addOptions(u, opt)
|
||||
if err != nil {
|
||||
@@ -292,7 +291,7 @@ func (s *ActivityService) ListUserEventsForOrganization(org, user string, opt *L
|
||||
}
|
||||
|
||||
var events []*Event
|
||||
resp, err := s.client.Do(req, &events)
|
||||
resp, err := s.client.Do(ctx, req, &events)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user