class Github::Client::Repos::Comments
def create(*args)
- Api: - public
Options Hash:
(**params)
-
:line
(Number
) -- -
:position
(Number
) -- -
:path
(String
) -- -
:body
(String
) --
Parameters:
-
params
(Hash
) --
def create(*args) arguments(args, required: [:user, :repo, :sha]) do assert_required REQUIRED_COMMENT_OPTIONS end post_request("/repos/#{arguments.user}/#{arguments.repo}/commits/#{arguments.sha}/comments", arguments.params) end
def delete(*args)
- Api: - public
def delete(*args) arguments(args, required: [:user, :repo, :id]) delete_request("/repos/#{arguments.user}/#{arguments.repo}/comments/#{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}/comments/#{arguments.id}", arguments.params) end
def list(*args)
- Api: - public
def list(*args) arguments(args, required: [:user, :repo]) params = arguments.params user = arguments.user repo = arguments.repo response = if (sha = params.delete('sha')) get_request("/repos/#{user}/#{repo}/commits/#{sha}/comments", params) else get_request("/repos/#{user}/#{repo}/comments", params) end return response unless block_given? response.each { |el| yield el } end
def update(*args)
- Api: - public
Options Hash:
(**params)
-
:body
(String
) --
Parameters:
-
params
(Hash
) --
def update(*args) arguments(args, required: [:user, :repo, :id]) do assert_required REQUIRED_COMMENT_OPTIONS end patch_request("/repos/#{arguments.user}/#{arguments.repo}/comments/#{arguments.id}", arguments.params) end