mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-04 12:37:59 +00:00
Bump deps
This commit is contained in:
27
vendor/github.com/google/go-github/github/github.go
generated
vendored
27
vendor/github.com/google/go-github/github/github.go
generated
vendored
@@ -27,7 +27,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
libraryVersion = "8"
|
||||
libraryVersion = "11"
|
||||
defaultBaseURL = "https://api.github.com/"
|
||||
uploadBaseURL = "https://uploads.github.com/"
|
||||
userAgent = "go-github/" + libraryVersion
|
||||
@@ -67,10 +67,6 @@ const (
|
||||
// https://developer.github.com/changes/2016-05-12-reactions-api-preview/
|
||||
mediaTypeReactionsPreview = "application/vnd.github.squirrel-girl-preview"
|
||||
|
||||
// https://developer.github.com/changes/2016-04-01-squash-api-preview/
|
||||
// https://developer.github.com/changes/2016-09-26-pull-request-merge-api-update/
|
||||
mediaTypeSquashPreview = "application/vnd.github.polaris-preview+json"
|
||||
|
||||
// https://developer.github.com/changes/2016-04-04-git-signing-api-preview/
|
||||
mediaTypeGitSigningPreview = "application/vnd.github.cryptographer-preview+json"
|
||||
|
||||
@@ -100,6 +96,12 @@ const (
|
||||
|
||||
// https://developer.github.com/changes/2017-05-23-coc-api/
|
||||
mediaTypeCodesOfConductPreview = "application/vnd.github.scarlet-witch-preview+json"
|
||||
|
||||
// https://developer.github.com/changes/2017-07-17-update-topics-on-repositories/
|
||||
mediaTypeTopicsPreview = "application/vnd.github.mercy-preview+json"
|
||||
|
||||
// https://developer.github.com/changes/2017-07-26-team-review-request-thor-preview/
|
||||
mediaTypeTeamReviewPreview = "application/vnd.github.thor-preview+json"
|
||||
)
|
||||
|
||||
// A Client manages communication with the GitHub API.
|
||||
@@ -239,13 +241,14 @@ func NewClient(httpClient *http.Client) *Client {
|
||||
// specified, the value pointed to by body is JSON encoded and included as the
|
||||
// request body.
|
||||
func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error) {
|
||||
rel, err := url.Parse(urlStr)
|
||||
if !strings.HasSuffix(c.BaseURL.Path, "/") {
|
||||
return nil, fmt.Errorf("BaseURL must have a trailing slash, but %q does not", c.BaseURL)
|
||||
}
|
||||
u, err := c.BaseURL.Parse(urlStr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
u := c.BaseURL.ResolveReference(rel)
|
||||
|
||||
var buf io.ReadWriter
|
||||
if body != nil {
|
||||
buf = new(bytes.Buffer)
|
||||
@@ -274,12 +277,14 @@ func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Requ
|
||||
// urlStr, in which case it is resolved relative to the UploadURL of the Client.
|
||||
// Relative URLs should always be specified without a preceding slash.
|
||||
func (c *Client) NewUploadRequest(urlStr string, reader io.Reader, size int64, mediaType string) (*http.Request, error) {
|
||||
rel, err := url.Parse(urlStr)
|
||||
if !strings.HasSuffix(c.UploadURL.Path, "/") {
|
||||
return nil, fmt.Errorf("UploadURL must have a trailing slash, but %q does not", c.UploadURL)
|
||||
}
|
||||
u, err := c.UploadURL.Parse(urlStr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
u := c.UploadURL.ResolveReference(rel)
|
||||
req, err := http.NewRequest("POST", u.String(), reader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -394,7 +399,7 @@ func parseRate(r *http.Response) Rate {
|
||||
// The provided ctx must be non-nil. If it is canceled or times out,
|
||||
// ctx.Err() will be returned.
|
||||
func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error) {
|
||||
ctx, req = withContext(ctx, req)
|
||||
req = withContext(ctx, req)
|
||||
|
||||
rateLimitCategory := category(req.URL.Path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user