Update deps

This commit is contained in:
Jeff Mitchell
2017-02-24 14:36:54 -05:00
parent a4d535c9c1
commit ec7ec42e4c
146 changed files with 2195 additions and 4457 deletions

View File

@@ -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 users 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
}