def iterate_pages(client, method, *args)
      args << DEFAULT_REQUEST_OPTIONS.merge(extract_request_args(args))

      check_github_response { client.send(method, user_project, *args) }
      last_response = client.last_response.tap do |response|
        raise(MovedPermanentlyError, response.data[:url]) if response.status == 301
      end

      yield(last_response.data)

      until (next_one = last_response.rels[:next]).nil?
        last_response = check_github_response { next_one.get }
        yield(last_response.data)
      end
    end
def iterate_pages(client, method, *args)
      args << DEFAULT_REQUEST_OPTIONS.merge(extract_request_args(args))

      check_github_response { client.send(method, user_project, *args) }
      last_response = client.last_response.tap do |response|
        raise(MovedPermanentlyError, response.data[:url]) if response.status == 301
      end

      yield(last_response.data)

      until (next_one = last_response.rels[:next]).nil?
        last_response = check_github_response { next_one.get }
        yield(last_response.data)
      end
    end
Iterates through all pages until there are no more :next pages to follow
 yields the result per page

 @param [Octokit::Client] client
 @param [String] method (eg. 'tags')

 @yield [Sawyer::Resource] An OctoKit-provided response (which can be empty)

 @return [void]