lib/github_api/issues/assignees.rb in github_api-0.7.0 vs lib/github_api/issues/assignees.rb in github_api-0.7.1
- old
+ new
@@ -6,14 +6,15 @@
# lists all the available assignees (owner + collaborators)
# to which issues may be assigned.
#
# = Examples
#
- # Github.repos.assignees.list 'user', 'repo'
- # Github.repos.assignees.list 'user', 'repo' { |assignee| ... }
+ # Github.issues.assignees.list 'user', 'repo'
+ # Github.issues.assignees.list 'user', 'repo' { |assignee| ... }
#
def list(user_name, repo_name, params={})
+ assert_presence_of user_name, repo_name
normalize! params
response = get_request("/repos/#{user_name}/#{repo_name}/assignees", params)
return response unless block_given?
response.each { |el| yield el }
@@ -21,13 +22,13 @@
# Check to see if a particular user is an assignee for a repository.
#
# = Examples
#
- # Github.repos.assignees.check 'user', 'repo', 'assignee'
+ # Github.issues.assignees.check 'user', 'repo', 'assignee'
#
def check(user_name, repo_name, assignee, params={})
- _validate_presence_of assignee
+ assert_presence_of user_name, repo_name, assignee
normalize! params
get_request("/repos/#{user_name}/#{repo_name}/assignees/#{assignee}",params)
true
rescue Github::Error::NotFound