diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2017-04-10 21:18:42 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2017-04-10 21:38:33 +0100 |
commit | 30802e07b2d84fbc213b490d3402707dffe60096 (patch) | |
tree | 934aecb8f3582325dfd1aa6652193adac87d00db /vendor/github.com/google/go-github/github/git_tags.go | |
parent | da7638dc112c4c106e8929601b642d2ca4596cba (diff) |
update dependencies
Diffstat (limited to 'vendor/github.com/google/go-github/github/git_tags.go')
-rw-r--r-- | vendor/github.com/google/go-github/github/git_tags.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/github.com/google/go-github/github/git_tags.go b/vendor/github.com/google/go-github/github/git_tags.go index a58858b..08df3d3 100644 --- a/vendor/github.com/google/go-github/github/git_tags.go +++ b/vendor/github.com/google/go-github/github/git_tags.go @@ -6,6 +6,7 @@ package github import ( + "context" "fmt" ) @@ -34,7 +35,7 @@ type createTagRequest struct { // GetTag fetchs a tag from a repo given a SHA. // // GitHub API docs: https://developer.github.com/v3/git/tags/#get-a-tag -func (s *GitService) GetTag(owner string, repo string, sha string) (*Tag, *Response, error) { +func (s *GitService) GetTag(ctx context.Context, owner string, repo string, sha string) (*Tag, *Response, error) { u := fmt.Sprintf("repos/%v/%v/git/tags/%v", owner, repo, sha) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -45,14 +46,14 @@ func (s *GitService) GetTag(owner string, repo string, sha string) (*Tag, *Respo req.Header.Set("Accept", mediaTypeGitSigningPreview) tag := new(Tag) - resp, err := s.client.Do(req, tag) + resp, err := s.client.Do(ctx, req, tag) return tag, resp, err } // CreateTag creates a tag object. // // GitHub API docs: https://developer.github.com/v3/git/tags/#create-a-tag-object -func (s *GitService) CreateTag(owner string, repo string, tag *Tag) (*Tag, *Response, error) { +func (s *GitService) CreateTag(ctx context.Context, owner string, repo string, tag *Tag) (*Tag, *Response, error) { u := fmt.Sprintf("repos/%v/%v/git/tags", owner, repo) // convert Tag into a createTagRequest @@ -72,6 +73,6 @@ func (s *GitService) CreateTag(owner string, repo string, tag *Tag) (*Tag, *Resp } t := new(Tag) - resp, err := s.client.Do(req, t) + resp, err := s.client.Do(ctx, req, t) return t, resp, err } |