Bump deps

This commit is contained in:
Jeff Mitchell
2018-01-26 18:51:00 -05:00
parent 6d9efa1dac
commit 43493f2767
1091 changed files with 120695 additions and 41806 deletions

View File

@@ -8,6 +8,7 @@ package github
import (
"context"
"fmt"
"strings"
"time"
)
@@ -25,7 +26,7 @@ type IssuesService service
// this is an issue, and if PullRequestLinks is not nil, this is a pull request.
// The IsPullRequest helper method can be used to check that.
type Issue struct {
ID *int `json:"id,omitempty"`
ID *int64 `json:"id,omitempty"`
Number *int `json:"number,omitempty"`
State *string `json:"state,omitempty"`
Locked *bool `json:"locked,omitempty"`
@@ -50,6 +51,7 @@ type Issue struct {
Repository *Repository `json:"repository,omitempty"`
Reactions *Reactions `json:"reactions,omitempty"`
Assignees []*User `json:"assignees,omitempty"`
NodeID *string `json:"node_id,omitempty"`
// TextMatches is only populated from search results that request text matches
// See: search.go and https://developer.github.com/v3/search/#text-match-metadata
@@ -153,8 +155,9 @@ func (s *IssuesService) listIssues(ctx context.Context, u string, opt *IssueList
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeReactionsPreview)
// TODO: remove custom Accept headers when APIs fully launch.
acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeGraphQLNodeIDPreview}
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
var issues []*Issue
resp, err := s.client.Do(ctx, req, &issues)
@@ -220,8 +223,9 @@ func (s *IssuesService) ListByRepo(ctx context.Context, owner string, repo strin
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeReactionsPreview)
// TODO: remove custom Accept headers when APIs fully launch.
acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeGraphQLNodeIDPreview}
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
var issues []*Issue
resp, err := s.client.Do(ctx, req, &issues)
@@ -242,8 +246,9 @@ func (s *IssuesService) Get(ctx context.Context, owner string, repo string, numb
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeReactionsPreview)
// TODO: remove custom Accept headers when APIs fully launch.
acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeGraphQLNodeIDPreview}
req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
issue := new(Issue)
resp, err := s.client.Do(ctx, req, issue)
@@ -264,6 +269,9 @@ func (s *IssuesService) Create(ctx context.Context, owner string, repo string, i
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
i := new(Issue)
resp, err := s.client.Do(ctx, req, i)
if err != nil {
@@ -283,6 +291,9 @@ func (s *IssuesService) Edit(ctx context.Context, owner string, repo string, num
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
i := new(Issue)
resp, err := s.client.Do(ctx, req, i)
if err != nil {