diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-11-29 09:09:17 +0100 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-11-29 11:50:22 +0100 |
commit | 57dc9efaaef3756f5b432b030973295934634544 (patch) | |
tree | 07b5ccbda7bc00cc683886a4368432a4201204a5 /vendor/code.gitea.io/sdk/gitea/repo_branch.go | |
parent | f3645224680e7a3f5477c0804aa2690d6262779f (diff) | |
download | gitea-57dc9efaaef3756f5b432b030973295934634544.tar.gz gitea-57dc9efaaef3756f5b432b030973295934634544.zip |
Update gitea/sdk vendor
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/repo_branch.go')
-rw-r--r-- | vendor/code.gitea.io/sdk/gitea/repo_branch.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/repo_branch.go b/vendor/code.gitea.io/sdk/gitea/repo_branch.go index c57df07c62..fadc9e3956 100644 --- a/vendor/code.gitea.io/sdk/gitea/repo_branch.go +++ b/vendor/code.gitea.io/sdk/gitea/repo_branch.go @@ -14,11 +14,13 @@ type Branch struct { Commit *PayloadCommit `json:"commit"` } +// ListRepoBranches list all the branches of one repository func (c *Client) ListRepoBranches(user, repo string) ([]*Branch, error) { branches := make([]*Branch, 0, 10) return branches, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/branches", user, repo), nil, nil, &branches) } +// GetRepoBranch get one branch's information of one repository func (c *Client) GetRepoBranch(user, repo, branch string) (*Branch, error) { b := new(Branch) return b, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/branches/%s", user, repo, branch), nil, nil, &b) |