module Gitlab::Client::Projects
def add_project_hook(project, url, options={})
-
(Gitlab::ObjectifiedHash)
- Information about added hook.
Parameters:
-
option
(Boolean
) -- :tag_push_events Trigger hook on push_tag events (0 = false, 1 = true) -
option
(Boolean
) -- :merge_requests_events Trigger hook on merge_requests events (0 = false, 1 = true) -
option
(Boolean
) -- :issues_events Trigger hook on issues events (0 = false, 1 = true) -
option
(Boolean
) -- :push_events Trigger hook on push events (0 = false, 1 = true) -
options
(Hash
) -- A customizable set of options. -
url
(String
) -- The hook URL. -
project
(Integer, String
) -- The ID or name of a project.
def add_project_hook(project, url, options={}) body = { url: url }.merge(options) post("/projects/#{project}/hooks", body: body) end