Merged
Conversation
From https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api?apiVersion=2022-11-28 > In some cases, only a subset of these links are available. For example, the link to the previous page won't be included if you are on the first page of results, and the link to the last page won't be included if it can't be calculated. ``` $ be rake test ... Cause0: NoMethodError: undefined method 'to_str' for nil /Users/rschneeman/.rubies/ruby-4.0.1/lib/ruby/4.0.0/uri/rfc3986_parser.rb:79:in 'URI::RFC3986_Parser#split' /Users/rschneeman/.rubies/ruby-4.0.1/lib/ruby/4.0.0/uri/rfc3986_parser.rb:135:in 'URI::RFC3986_Parser#parse' /Users/rschneeman/.rubies/ruby-4.0.1/lib/ruby/4.0.0/uri/common.rb:247:in 'URI.parse' /Users/rschneeman/Documents/projects/git_hub_bub/lib/git_hub_bub/response.rb:88:in 'GitHubBub::Response#page_number_from_url' /Users/rschneeman/Documents/projects/git_hub_bub/lib/git_hub_bub/response.rb:77:in 'GitHubBub::Response#last_page?' /Users/rschneeman/Documents/projects/git_hub_bub/test/git_hub_bub/response_test.rb:82:in 'ResponseTest#test_last_page_with_next_but_no_last_url' 79: assert_nil response.last_url 80: 81: # This will fail because last_page? tries to parse last_url when it's nil => 82: refute response.last_page? 83: end 84: 85: def test_rate_limit_sleep ================================================================================================================================================================================ E ================================================================================================================================================================================ Error: test_pagination(ResponseTest): NoMethodError: undefined method 'parse' for class CGI /Users/rschneeman/Documents/projects/git_hub_bub/lib/git_hub_bub/response.rb:89:in 'GitHubBub::Response#page_number_from_url' /Users/rschneeman/Documents/projects/git_hub_bub/lib/git_hub_bub/response.rb:77:in 'GitHubBub::Response#last_page?' /Users/rschneeman/Documents/projects/git_hub_bub/test/git_hub_bub/response_test.rb:15:in 'ResponseTest#test_pagination' 12: assert_equal nil, response.prev_url 13: assert_equal nil, response.first_url 14: => 15: refute response.last_page? 16: assert response.first_page? 17: 18: response = GitHubBub::Response.new(rails_issues_data(:second)) ================================================================================================================================================================================ Finished in 0.03191 seconds. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 15 tests, 34 assertions, 0 failures, 2 errors, 0 pendings, 0 omissions, 0 notifications 86.6667% passed -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 470.07 tests/s, 1065.50 assertions/s rake aborted! Command failed with status (1): [ruby -w -I"lib:lib:test" /Users/rschneeman/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb "test/git_hub_bub/request_test.rb" "test/git_hub_bub/response_test.rb" "test/git_hub_bub/valid_token_test.rb" ] /Users/rschneeman/.rubies/ruby-4.0.1/bin/bundle:25:in '<main>' Tasks: TOP => test ```
schneems
added a commit
to codetriage/CodeTriage
that referenced
this pull request
Feb 2, 2026
Issue pulling was failing due to zombocom/git_hub_bub#7.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
last_urlis not always available. From https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api?apiVersion=2022-11-28This causes failures reproduced in this test:
A failing test was added and then fixed.