Repository navigation
Read every page of releases so a run of prereleases cannot hide the stable one - #225
Merged
Merged
Conversation
…table one ListReleasesAsync made one call with GitHub's default page size of 30, so a repository whose 30 newest releases were prereleases was dropped from the profile README as having no stable release. Paginate with per_page=100 until a short page, as the repository and commit listings already do. Fixes #169 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CzB8uCZc7DWCamHvE3Qk4k
|
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.



Fixes #169
What changed
GitHubApiClient.ListReleasesAsyncmade onegh api /repos/{org}/{repo}/releasescall with noper_page. GitHub's default page size is 30, so a repository whose 30 newest releases were prereleases had its stable release on page 2.OrgProfileServicethen found no stable tag and dropped the repository from the profile README.The method now reads pages with
per_page=100&page=Nuntil it gets a short page. That is the same loopListOrganizationRepositoriesAsyncandCountCommitsSinceAsyncalready use. I did not add an early stop at the first stable tag, which the decision comment allows but doesn't require. It would put profile logic into the API client, and with 100 per page a second call only happens for repositories with more than 100 releases.Tests
ListReleasesAsync_ReadsPastAFullPageOfPrereleases: page 1 holds 100-pretags and page 2 holdsv1.0.0. The test checks that all 101 tags come back, in two requests, usingper_page=100. It fails onmain: I reverted the fix and saw it fail.ListReleasesAsync_WithFewerThanAPageOfReleases_MakesOneCall: a repository with fewer than 100 releases still makes exactly one call.🤖 Generated with Claude Code
https://claude.ai/code/session_01CzB8uCZc7DWCamHvE3Qk4k
Generated by Claude Code