class Github::Client::Issues::Assignees

Public Instance Methods

all(*args)
Alias for: list
check(*args) click to toggle source

Check to see if a particular user is an assignee for a repository.

@example

Github.issues.assignees.check 'user', 'repo', 'assignee'

@example

github = Github.new user: 'user-name', repo: 'repo-name'
github.issues.assignees.check 'assignee'

@api public

# File lib/github_api/client/issues/assignees.rb, line 31
def check(*args)
  arguments(args, required: [:owner, :repo, :assignee])
  params = arguments.params

  get_request("/repos/#{arguments.owner}/#{arguments.repo}/assignees/#{arguments.assignee}",params)
  true
rescue Github::Error::NotFound
  false
end
list(*args) { |el| ... } click to toggle source

Lists all the available assignees (owner + collaborators) to which issues may be assigned.

@example

Github.issues.assignees.list 'owner', 'repo'
Github.issues.assignees.list 'owner', 'repo' { |assignee| ... }

@api public

# File lib/github_api/client/issues/assignees.rb, line 12
def list(*args)
  arguments(args, required: [:owner, :repo])

  response = get_request("/repos/#{arguments.owner}/#{arguments.repo}/assignees", arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end
Also aliased as: all