Skip to content

Make all formatter releases available#45

Merged
axel-op merged 3 commits intoaxel-op:masterfrom
j-emmel:list-all-releases
Apr 27, 2026
Merged

Make all formatter releases available#45
axel-op merged 3 commits intoaxel-op:masterfrom
j-emmel:list-all-releases

Conversation

@j-emmel
Copy link
Copy Markdown
Contributor

@j-emmel j-emmel commented Feb 25, 2026

This action isn't able to run on Java 8 because it only sees the Github API's default of the 30 latest formatter releases. There are 42 releases currently, and the list cuts off at version 1.11.0 (JDK 11+).

This branch starts with the commits from #40, then increases the number of releases requested so any release can be used with the action:

  • when getting releases with curl, add ?per_page=100 (the maximum) to the end of everything
  • when listing releases with Octokit, use 100-length pages, and paginate

The curl version is clunky, but the API allows page length even for /latest:

I think it could be possible to use Octokit in the no-token case, too, with something like this: j-emmel@a409c3b

Resolves: #39
Resolves: #44

j-emmel added 2 commits April 28, 2026 00:53
By default, Github's API returns 30 results per page for 'list'
requests; this cuts off old Google Java Format releases, including
any that run on Java 8.

100 is the maxmimum. There are 42 releases at time of writing, so
this happens to let them all through.
@axel-op axel-op force-pushed the list-all-releases branch from 53636dd to c049075 Compare April 27, 2026 22:54
@axel-op axel-op force-pushed the list-all-releases branch from c049075 to 4905ee3 Compare April 27, 2026 23:05
@axel-op
Copy link
Copy Markdown
Owner

axel-op commented Apr 27, 2026

Thank you very much for taking the time to root cause the issue and to implement a fix :)

@axel-op axel-op merged commit d9a4b00 into axel-op:master Apr 27, 2026
15 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.

Old formatter releases aren't selectable The action no longer works since Google released v1.29.0 of "google-java-format"

2 participants