From c82ac420fc86f454700f9f6e6148ed27a6f185cd Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 16 Dec 2018 19:48:34 -0500 Subject: vendor: update - github.com/gogs/go-gogs-client - gopkg.in/macaron.v1 --- vendor/github.com/gogs/go-gogs-client/repo_commit.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vendor/github.com/gogs/go-gogs-client/repo_commit.go') diff --git a/vendor/github.com/gogs/go-gogs-client/repo_commit.go b/vendor/github.com/gogs/go-gogs-client/repo_commit.go index bd1a0804..b415962a 100644 --- a/vendor/github.com/gogs/go-gogs-client/repo_commit.go +++ b/vendor/github.com/gogs/go-gogs-client/repo_commit.go @@ -6,6 +6,7 @@ package gogs import ( "fmt" + "net/http" ) // CommitMeta contains meta information of a commit in terms of API. @@ -44,3 +45,9 @@ func (c *Client) GetSingleCommit(user, repo, commitID string) (*Commit, error) { commit := new(Commit) return commit, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/commits/%s", user, repo, commitID), nil, nil, &commit) } + +func (c *Client) GetReferenceSHA(user, repo, ref string) (string, error) { + data, err := c.getResponse("GET", fmt.Sprintf("/repos/%s/%s/commits/%s", user, repo, ref), + http.Header{"Accept": []string{MediaApplicationSHA}}, nil) + return string(data), err +} -- cgit v1.2.3