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 | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/system_hooks.go b/vendor/github.com/xanzy/go-gitlab/system_hooks.go index 20277a9..d2d3f5b 100644 --- a/vendor/github.com/xanzy/go-gitlab/system_hooks.go +++ b/vendor/github.com/xanzy/go-gitlab/system_hooks.go @@ -24,14 +24,16 @@ import ( // SystemHooksService handles communication with the system hooks related // methods of the GitLab API. // -// GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html +// GitLab API docs: +// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md type SystemHooksService struct { client *Client } // Hook represents a GitLap system hook. // -// GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html +// GitLab API docs: +// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md type Hook struct { ID int `json:"id"` URL string `json:"url"` @@ -45,7 +47,7 @@ func (h Hook) String() string { // ListHooks gets a list of system hooks. // // GitLab API docs: -// https://docs.gitlab.com/ce/api/system_hooks.html#list-system-hooks +// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md#list-system-hooks func (s *SystemHooksService) ListHooks(options ...OptionFunc) ([]*Hook, *Response, error) { req, err := s.client.NewRequest("GET", "hooks", nil, options) if err != nil { @@ -64,7 +66,7 @@ func (s *SystemHooksService) ListHooks(options ...OptionFunc) ([]*Hook, *Respons // AddHookOptions represents the available AddHook() options. // // GitLab API docs: -// https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook +// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md#add-new-system-hook-hook type AddHookOptions struct { URL *string `url:"url,omitempty" json:"url,omitempty"` } @@ -72,7 +74,7 @@ type AddHookOptions struct { // AddHook adds a new system hook hook. // // GitLab API docs: -// https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook +// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md#add-new-system-hook-hook func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...OptionFunc) (*Hook, *Response, error) { req, err := s.client.NewRequest("POST", "hooks", opt, options) if err != nil { @@ -90,7 +92,8 @@ func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...OptionFunc) // HookEvent represents an event triggert by a GitLab system hook. // -// GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html +// GitLab API docs: +// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md type HookEvent struct { EventName string `json:"event_name"` Name string `json:"name"` @@ -107,7 +110,7 @@ func (h HookEvent) String() string { // TestHook tests a system hook. // // GitLab API docs: -// https://docs.gitlab.com/ce/api/system_hooks.html#test-system-hook +// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md#test-system-hook func (s *SystemHooksService) TestHook(hook int, options ...OptionFunc) (*HookEvent, *Response, error) { u := fmt.Sprintf("hooks/%d", hook) @@ -130,7 +133,7 @@ func (s *SystemHooksService) TestHook(hook int, options ...OptionFunc) (*HookEve // is also returned as JSON. // // GitLab API docs: -// https://docs.gitlab.com/ce/api/system_hooks.html#delete-system-hook +// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md#delete-system-hook func (s *SystemHooksService) DeleteHook(hook int, options ...OptionFunc) (*Response, error) { u := fmt.Sprintf("hooks/%d", hook) |