Skip to content

Conversation

@Sodman
Copy link
Contributor

@Sodman Sodman commented Jul 29, 2020

A project I work on uses protoc 3.6.1, which just rolled over to page 2 in the releases API, and can no longer be setup using this action.

The error we see is:
##[error]unable to get latest version

Currently, this action calls https://api.github.com/repos/protocolbuffers/protobuf/releases to get all possible versions, but some releases have now rolled over to the 2nd page (and will eventually go on to the 3rd, etc etc).

As you can see, 3.6.1 as of today is now on the top of the second page - https://api.github.com/repos/protocolbuffers/protobuf/releases?page=2

This PR changes the fetchVersions logic to loop through the release pages until we reach the end, allowing all old versions to be used.

I've also updated the tests nock API mocks to return the current 1st, 2nd and 3rd pages of results from the protobuf releases API calls.

Sodman added 3 commits July 29, 2020 16:28
* Add pagination logic when checking for versions

This prevents older versions from no longer being considered
installable if they are on page2+ of the github releases API.
* Ran prettier
* Run prettier 1.18.2

Run specific version of prettier as newer versions will output
different results which do not pass the build.
@kdorosh
Copy link

kdorosh commented Nov 16, 2020

hello @rsora , can you take a look at merging this? if merged, we could drop our fork of the repo

@rsora
Copy link
Contributor

rsora commented Nov 16, 2020

on it 😸

Copy link
Contributor

@rsora rsora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks for contributing!

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.

3 participants