Skip to content

fix(avm): paginate GitHub releases when listing versions - #4921

Open
questfever wants to merge 2 commits into
otter-sec:masterfrom
questfever:master
Open

fix(avm): paginate GitHub releases when listing versions#4921
questfever wants to merge 2 commits into
otter-sec:masterfrom
questfever:master

Conversation

@questfever

@questfever questfever commented Aug 13, 2026

Copy link
Copy Markdown

Summary

fetch_versions_with_client currently makes a single request to GitHub's List releases endpoint. GitHub returns 30 releases by default, so avm list omits older published Anchor versions that are not present on the first page.

The repository currently has more than 30 releases. For example, the second page contains releases from v0.17.0 through v0.1.0, which are absent from the available-version list returned by AVM.

This change:

  • requests up to 100 releases per page;
  • continues fetching until all release pages have been processed;
  • determines whether pagination is complete before filtering drafts and
    pre-releases;
  • preserves the existing draft and pre-release filtering behavior;
  • updates the stale documentation comment that says repository tags are also
    queried;

Using only per_page=100 would fix the current symptom but would reintroduce the bug once the repository exceeds 100 releases, so the implementation performs full pagination.

Branch Target

master. This is a non-breaking bug fix.

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

@questfever is attempting to deploy a commit to the OtterSec Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread avm/src/lib.rs Outdated
Comment thread avm/src/lib.rs Outdated
@questfever

Copy link
Copy Markdown
Author

@jamie-osec Thanks! I dropped the test and updated pagination to use the response's Link header. It now stops when rel="next" is absent, avoiding an extra empty request when the release count is an exact multiple of 100.

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.

2 participants