mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-07 22:13:12 +00:00
Update deps
This commit is contained in:
13
vendor/github.com/google/go-github/github/git_commits.go
generated
vendored
13
vendor/github.com/google/go-github/github/git_commits.go
generated
vendored
@@ -6,6 +6,7 @@
|
||||
package github
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
@@ -57,8 +58,8 @@ func (c CommitAuthor) String() string {
|
||||
|
||||
// GetCommit fetchs the Commit object for a given SHA.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/git/commits/#get-a-commit
|
||||
func (s *GitService) GetCommit(owner string, repo string, sha string) (*Commit, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/git/commits/#get-a-commit
|
||||
func (s *GitService) GetCommit(ctx context.Context, owner string, repo string, sha string) (*Commit, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%v/%v/git/commits/%v", owner, repo, sha)
|
||||
req, err := s.client.NewRequest("GET", u, nil)
|
||||
if err != nil {
|
||||
@@ -69,7 +70,7 @@ func (s *GitService) GetCommit(owner string, repo string, sha string) (*Commit,
|
||||
req.Header.Set("Accept", mediaTypeGitSigningPreview)
|
||||
|
||||
c := new(Commit)
|
||||
resp, err := s.client.Do(req, c)
|
||||
resp, err := s.client.Do(ctx, req, c)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
@@ -92,8 +93,8 @@ type createCommit struct {
|
||||
// data if omitted. If the commit.Author is omitted, it will be filled in with
|
||||
// the authenticated user’s information and the current date.
|
||||
//
|
||||
// GitHub API docs: http://developer.github.com/v3/git/commits/#create-a-commit
|
||||
func (s *GitService) CreateCommit(owner string, repo string, commit *Commit) (*Commit, *Response, error) {
|
||||
// GitHub API docs: https://developer.github.com/v3/git/commits/#create-a-commit
|
||||
func (s *GitService) CreateCommit(ctx context.Context, owner string, repo string, commit *Commit) (*Commit, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%v/%v/git/commits", owner, repo)
|
||||
|
||||
body := &createCommit{}
|
||||
@@ -118,7 +119,7 @@ func (s *GitService) CreateCommit(owner string, repo string, commit *Commit) (*C
|
||||
}
|
||||
|
||||
c := new(Commit)
|
||||
resp, err := s.client.Do(req, c)
|
||||
resp, err := s.client.Do(ctx, req, c)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user