diff --git a/lib/github-release.rb b/lib/github-release.rb index b0fd8d8..275da58 100644 --- a/lib/github-release.rb +++ b/lib/github-release.rb @@ -17,6 +17,8 @@ def run private def api @api ||= Octokit::Client.new(:access_token => token) + @api.auto_paginate = true + @api end def token @@ -91,20 +93,10 @@ def remote_name end def github_releases - @github_releases ||= api_repo_rels[:releases].get.data.map(&:tag_name) + @github_releases ||= api.releases(repo_name).map(&:tag_name) log_val(@github_releases) end - def api_repo - @api_repo ||= api.repo(repo_name) - log_val(@api_repo) - end - - def api_repo_rels - @api_repo_rels ||= api_repo.rels - log_val(@api_repo_rels) - end - def git_config(item, default = nil) @config_cache ||= {}