diff options
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/system_hooks.go')
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/system_hooks.go | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/system_hooks.go b/vendor/github.com/xanzy/go-gitlab/system_hooks.go index d5209d4f76..041264e952 100644 --- a/vendor/github.com/xanzy/go-gitlab/system_hooks.go +++ b/vendor/github.com/xanzy/go-gitlab/system_hooks.go @@ -46,7 +46,7 @@ func (h Hook) String() string { // // GitLab API docs: // https://docs.gitlab.com/ce/api/system_hooks.html#list-system-hooks -func (s *SystemHooksService) ListHooks(options ...OptionFunc) ([]*Hook, *Response, error) { +func (s *SystemHooksService) ListHooks(options ...RequestOptionFunc) ([]*Hook, *Response, error) { req, err := s.client.NewRequest("GET", "hooks", nil, options) if err != nil { return nil, nil, err @@ -66,14 +66,20 @@ func (s *SystemHooksService) ListHooks(options ...OptionFunc) ([]*Hook, *Respons // GitLab API docs: // https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook type AddHookOptions struct { - URL *string `url:"url,omitempty" json:"url,omitempty"` + URL *string `url:"url,omitempty" json:"url,omitempty"` + Token *string `url:"token,omitempty" json:"token,omitempty"` + PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` + TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` + MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` + RepositoryUpdateEvents *bool `url:"repository_update_events,omitempty" json:"repository_update_events,omitempty"` + EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"` } // AddHook adds a new system hook hook. // // GitLab API docs: // https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook -func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...OptionFunc) (*Hook, *Response, error) { +func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...RequestOptionFunc) (*Hook, *Response, error) { req, err := s.client.NewRequest("POST", "hooks", opt, options) if err != nil { return nil, nil, err @@ -108,7 +114,7 @@ func (h HookEvent) String() string { // // GitLab API docs: // https://docs.gitlab.com/ce/api/system_hooks.html#test-system-hook -func (s *SystemHooksService) TestHook(hook int, options ...OptionFunc) (*HookEvent, *Response, error) { +func (s *SystemHooksService) TestHook(hook int, options ...RequestOptionFunc) (*HookEvent, *Response, error) { u := fmt.Sprintf("hooks/%d", hook) req, err := s.client.NewRequest("GET", u, nil, options) @@ -131,7 +137,7 @@ func (s *SystemHooksService) TestHook(hook int, options ...OptionFunc) (*HookEve // // GitLab API docs: // https://docs.gitlab.com/ce/api/system_hooks.html#delete-system-hook -func (s *SystemHooksService) DeleteHook(hook int, options ...OptionFunc) (*Response, error) { +func (s *SystemHooksService) DeleteHook(hook int, options ...RequestOptionFunc) (*Response, error) { u := fmt.Sprintf("hooks/%d", hook) req, err := s.client.NewRequest("DELETE", u, nil, options) |