class Github::Client::Repos::Hooks
service hooks for a repository.
The Repository Hooks API manages the post-receive web and
def create(*args)
- Api: - public
Parameters:
-
params
(Hash
) --
def create(*args) arguments(args, required: [:user, :repo]) do permit VALID_HOOK_PARAM_NAMES, recursive: false assert_required REQUIRED_PARAMS end post_request("/repos/#{arguments.user}/#{arguments.repo}/hooks", arguments.params) end
def delete(*args)
- Api: - public
def delete(*args) arguments(args, required: [:user, :repo, :id]) delete_request("/repos/#{arguments.user}/#{arguments.repo}/hooks/#{arguments.id}", arguments.params) end
def edit(*args)
- Api: - public
Parameters:
-
params
(Hash
) --
def edit(*args) arguments(args, required: [:user, :repo, :id]) do permit VALID_HOOK_PARAM_NAMES, recursive: false assert_required REQUIRED_PARAMS end patch_request("/repos/#{arguments.user}/#{arguments.repo}/hooks/#{arguments.id}", arguments.params) end
def get(*args)
- Api: - public
def get(*args) arguments(args, required: [:user, :repo, :id]) get_request("/repos/#{arguments.user}/#{arguments.repo}/hooks/#{arguments.id}", arguments.params) end
def list(*args)
- Api: - public
def list(*args) arguments(args, required: [:user, :repo]) response = get_request("/repos/#{arguments.user}/#{arguments.repo}/hooks", arguments.params) return response unless block_given? response.each { |el| yield el } end
def ping(*args)
- Api: - public
def ping(*args) arguments(args, required: [:user, :repo, :id]) post_request("/repos/#{arguments.user}/#{arguments.repo}/hooks/#{arguments.id}/pings", arguments.params) end
def test(*args)
- Api: - public
def test(*args) arguments(args, required: [:user, :repo, :id]) post_request("/repos/#{arguments.user}/#{arguments.repo}/hooks/#{arguments.id}/tests", arguments.params) end