Skip to content

hub release show doesn't seem to handle more than 1000 releases #2920

@nareshbaliga

Description

@nareshbaliga

Command attempted:

hub release show v1.551.1

What happened:
Error fetching releases: unexpected end of JSON input (HTTP 500)

More info:

Versions:
git version 2.32.0
hub version 2.14.2

OS:
MacOS, Alpine

Debug:
We have more than 1000 releases per project. It seems that hub release show goes through a paginated+limit loop to hit the Github REST API to obtain information about the particular release.

It seems to boils down to an issue with the Github REST API where more than 1000 releases are not supported, irrespective of pagination approach.
curl -i -H "Authorization: token <redacted>" "https://api.github.com/repos/myorg/myrepo/releases?per_page=100&page=11"
doesn't work when there are more that 1000 releases.

Similarly,
curl -i -H "Authorization: token <redacted>" "https://api.github.com/repos/myorg/myrepo/releases?per_page=50&page=21"
doesn't work.

and results in an HTTP 500.

If there are < 1000 releases, the above commands will work, and return an empty list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions