From 30802e07b2d84fbc213b490d3402707dffe60096 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Mon, 10 Apr 2017 21:18:42 +0100 Subject: update dependencies --- vendor/github.com/google/go-github/github/git_trees.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'vendor/github.com/google/go-github/github/git_trees.go') diff --git a/vendor/github.com/google/go-github/github/git_trees.go b/vendor/github.com/google/go-github/github/git_trees.go index 13acfa6..bdd481f 100644 --- a/vendor/github.com/google/go-github/github/git_trees.go +++ b/vendor/github.com/google/go-github/github/git_trees.go @@ -5,7 +5,10 @@ package github -import "fmt" +import ( + "context" + "fmt" +) // Tree represents a GitHub tree. type Tree struct { @@ -36,7 +39,7 @@ func (t TreeEntry) String() string { // GetTree fetches the Tree object for a given sha hash from a repository. // // GitHub API docs: https://developer.github.com/v3/git/trees/#get-a-tree -func (s *GitService) GetTree(owner string, repo string, sha string, recursive bool) (*Tree, *Response, error) { +func (s *GitService) GetTree(ctx context.Context, owner string, repo string, sha string, recursive bool) (*Tree, *Response, error) { u := fmt.Sprintf("repos/%v/%v/git/trees/%v", owner, repo, sha) if recursive { u += "?recursive=1" @@ -48,7 +51,7 @@ func (s *GitService) GetTree(owner string, repo string, sha string, recursive bo } t := new(Tree) - resp, err := s.client.Do(req, t) + resp, err := s.client.Do(ctx, req, t) if err != nil { return nil, resp, err } @@ -67,7 +70,7 @@ type createTree struct { // that tree with the new path contents and write a new tree out. // // GitHub API docs: https://developer.github.com/v3/git/trees/#create-a-tree -func (s *GitService) CreateTree(owner string, repo string, baseTree string, entries []TreeEntry) (*Tree, *Response, error) { +func (s *GitService) CreateTree(ctx context.Context, owner string, repo string, baseTree string, entries []TreeEntry) (*Tree, *Response, error) { u := fmt.Sprintf("repos/%v/%v/git/trees", owner, repo) body := &createTree{ @@ -80,7 +83,7 @@ func (s *GitService) CreateTree(owner string, repo string, baseTree string, entr } t := new(Tree) - resp, err := s.client.Do(req, t) + resp, err := s.client.Do(ctx, req, t) if err != nil { return nil, resp, err } -- cgit v1.2.3