Skip to content

Fix CI Go version drift, releases pagination, and add GitHub token auth - #72

Merged
mikejoh merged 4 commits into
mainfrom
fix/go-version-and-releases-pagination
Aug 10, 2026
Merged

mikejoh merged 4 commits into
mainfrom
fix/go-version-and-releases-pagination

Conversation

@mikejoh

@mikejoh mikejoh commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bump Go to 1.26.4 in go.mod/Makefile and switch CI to go-version-file: go.mod so the runner version can't drift from go.mod again (was causing every make test run to fail).
  • Fix -per-page flag's copy-pasted help text.
  • Paginate the releases fetch (was single-page, silently truncating old releases like 1.33.0-1.33.9) with graceful handling of GitHub's 1000-result cap on this endpoint.
  • Add GITHUB_TOKEN env var support (go-github's WithAuthToken) to raise the 60 req/hr unauthenticated cap to 5,000/hr, since pagination now issues more requests.

Test plan

  • go build ./... and make test pass locally
  • go run ./cmd/rke2diff -releases | grep 1.33 now returns the full 1.33.x range (verified via authenticated run)
  • Verified GITHUB_TOKEN auth end-to-end with a real token

🤖 Generated with Claude Code

x/net v0.52.0+ requires go.mod's go directive at 1.25.0+, but CI
still pinned actions/setup-go to 1.22.4, failing every make test
run. Bump go.mod/Makefile to 1.26.4 and switch CI to
go-version-file: go.mod so CI always tracks go.mod and can't drift
again.

Assisted-by: Claude Code/claude-sonnet-5
per-page flag had -skip-rc's description copy-pasted onto it. Releases
fetch also only pulled a single page (100 newest), so -releases missed
older point releases once total release count grew past --per-page.
Now paginates through all pages, stopping gracefully at GitHub's
1000-result cap on this endpoint instead of failing.

Assisted-by: Claude Code/claude-sonnet-5
Client was always unauthenticated, capped at 60 req/hr, which the new
release pagination burns through fast. Use GITHUB_TOKEN env var when
set (go-github's WithAuthToken) to raise the cap to 5,000 req/hr.

Assisted-by: Claude Code/claude-sonnet-5
-per-page help text in the usage block still showed the old
copy-pasted description. Download example was pinned to the long-gone
0.1.3 release; bump to 0.2.1 and point at the releases page.

Assisted-by: Claude Code/claude-sonnet-5
@mikejoh
mikejoh merged commit 76f71bc into main Aug 10, 2026
1 check 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.

1 participant