From 74fdc2026a16c600c28ea109f8df728f5a90ea82 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Tue, 10 Oct 2017 21:22:17 +0200 Subject: [PATCH] OctoFetcher: drop unused number_of_pages feature (#568) --- lib/github_changelog_generator/octo_fetcher.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/github_changelog_generator/octo_fetcher.rb b/lib/github_changelog_generator/octo_fetcher.rb index e8005bd..2575a91 100644 --- a/lib/github_changelog_generator/octo_fetcher.rb +++ b/lib/github_changelog_generator/octo_fetcher.rb @@ -274,13 +274,11 @@ Make sure, that you push tags to remote repo via 'git push --tags'" # # @yield [Sawyer::Resource] An OctoKit-provided response (which can be empty) # - # @return [Integer] total number of pages + # @return [void] def iterate_pages(client, method, *args) request_opts = extract_request_args(args) args.push(@request_options.merge(request_opts)) - number_of_pages = 1 - check_github_response { client.send(method, user_project, *args) } last_response = client.last_response if last_response.status == 301 @@ -290,13 +288,9 @@ Make sure, that you push tags to remote repo via 'git push --tags'" yield(last_response.data) until (next_one = last_response.rels[:next]).nil? - number_of_pages += 1 - last_response = check_github_response { next_one.get } yield(last_response.data) end - - number_of_pages end def extract_request_args(args)