Skip to content

#1036: fix path for listing public repositories#1852

Merged
yegor256 merged 2 commits intojcabi:masterfrom
bibonix:fix-1036-public-repos-path
May 6, 2026
Merged

#1036: fix path for listing public repositories#1852
yegor256 merged 2 commits intojcabi:masterfrom
bibonix:fix-1036-public-repos-path

Conversation

@bibonix
Copy link
Copy Markdown
Contributor

@bibonix bibonix commented May 6, 2026

@yegor256 this PR fixes #1036.

Bug

Repos#iterate(String) (implemented by RtRepos) is documented to call the GitHub "List all public repositories" endpoint (/repositories?since=...), but it was issuing the request against the API root: /?since=.... As a result, GitHub returned the JSON object describing the API root rather than the expected JSON array, and RtPagination failed with javax.json.JsonException: Cannot read JSON array, found JSON object.

Fix

Add the missing /repositories path segment in RtRepos#iterate:

this.entry.uri().path("/repositories").queryParam("since", identifier).back()

Commits

  1. #1036: regression test asserting /repositories path adds RtReposTest#iterateReposUsesPublicRepositoriesPath, which intercepts the outgoing request and asserts the URI ends with /repositories?since=<id>. Verified to fail on master and pass with the fix applied.
  2. #1036: prepend /repositories path in RtRepos#iterate is the one-line fix.

Build status

  • mvn -DskipITs test passes locally (717 tests, 0 failures).
  • mvn -Pqulice install reports the same 837 PMD violations that already exist on master (e.g. PR #1168: handle JSON null in User.Smart#name() and #hasName() #1851 was merged with the identical mvn (ubuntu-24.04, 24) failure). I confirmed locally that this branch produces exactly the same 837 violations as master — i.e. this PR does not introduce any new qulice violations.

@bibonix bibonix force-pushed the fix-1036-public-repos-path branch from 916f506 to bafbc75 Compare May 6, 2026 12:24
@yegor256 yegor256 merged commit c6e99f7 into jcabi:master May 6, 2026
8 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect Public Repo List GET

2 participants