forked from forgejo/forgejo
Update gitea/sdk vendor
This commit is contained in:
parent
f364522468
commit
57dc9efaae
26 changed files with 301 additions and 33 deletions
2
vendor/code.gitea.io/sdk/gitea/repo_branch.go
generated
vendored
2
vendor/code.gitea.io/sdk/gitea/repo_branch.go
generated
vendored
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue