Method: Github::Client::Issues::Comments#list

Defined in:
lib/github_api2/client/issues/comments.rb

#list(*args) ⇒ Object Also known as: all

List comments on an issue

List comments in a repository

Examples:

github = Github.new
github.issues.comments.all 'owner-name', 'repo-name', number: 'id'
github.issues.comments.all 'owner-name', 'repo-name', number: 'id' {|com| .. }
github.issues.comments.all owner: 'username', repo: 'repo-name', number: 'id'
github = Github.new
github.issues.comments.all 'user-name', 'repo-name'
github.issues.comments.all 'user-name', 'repo-name' {|com| .. }

Parameters:



39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/github_api2/client/issues/comments.rb', line 39

def list(*args)
  arguments(args, required: [:user, :repo])
  params = arguments.params

  response = if (number = params.delete('number'))
    get_request("/repos/#{arguments.user}/#{arguments.repo}/issues/#{number}/comments", params)
  else
    get_request("/repos/#{arguments.user}/#{arguments.repo}/issues/comments", params)
  end
  return response unless block_given?
  response.each { |el| yield el }
end