mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-13 20:24:03 +09:00
Update gitea/sdk vendor
This commit is contained in:
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)
|
||||
|
Reference in New Issue
Block a user