mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-19 10:12:54 +02:00
Migrate gitea-sdk to v0.12.0 (#133)
Migrate Update code.gitea.io/sdk/gitea to v0.12.0. Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/133 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
12
vendor/code.gitea.io/sdk/gitea/git_hook.go
generated
vendored
12
vendor/code.gitea.io/sdk/gitea/git_hook.go
generated
vendored
@ -17,10 +17,16 @@ type GitHook struct {
|
||||
Content string `json:"content,omitempty"`
|
||||
}
|
||||
|
||||
// ListRepoGitHooksOptions options for listing repository's githooks
|
||||
type ListRepoGitHooksOptions struct {
|
||||
ListOptions
|
||||
}
|
||||
|
||||
// ListRepoGitHooks list all the Git hooks of one repository
|
||||
func (c *Client) ListRepoGitHooks(user, repo string) ([]*GitHook, error) {
|
||||
hooks := make([]*GitHook, 0, 10)
|
||||
return hooks, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/hooks/git", user, repo), nil, nil, &hooks)
|
||||
func (c *Client) ListRepoGitHooks(user, repo string, opt ListRepoGitHooksOptions) ([]*GitHook, error) {
|
||||
opt.setDefaults()
|
||||
hooks := make([]*GitHook, 0, opt.PageSize)
|
||||
return hooks, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/hooks/git?%s", user, repo, opt.getURLQuery().Encode()), nil, nil, &hooks)
|
||||
}
|
||||
|
||||
// GetRepoGitHook get a Git hook of a repository
|
||||
|
Reference in New Issue
Block a user