Skip to content

Commit

Permalink
Correctly generate issues path
Browse files Browse the repository at this point in the history
Previously `Repository.new(nil)` would return `nil` so our path would
be `/issues`. It now correctly raises an error so if a repository
isn't specified then we want the issues for the user so the path
should be `issues`.
  • Loading branch information
henare committed Jun 25, 2015
1 parent 033e6dc commit 676a380
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/octokit/client/issues.rb
Expand Up @@ -28,7 +28,8 @@ module Issues
# @client = Octokit::Client.new(:login => 'foo', :password => 'bar')
# @client.list_issues
def list_issues(repository = nil, options = {})
paginate "#{Repository.new(repository).path}/issues", options
path = repository ? "#{Repository.new(repository).path}/issues" : "issues"
paginate path, options
end
alias :issues :list_issues

Expand Down

0 comments on commit 676a380

Please sign in to comment.