You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the --paginate option, I would expect it to yield a single, continuous JSON array. Instead, it is returning multiple arrays, each ~100 items long.
gh version:
$ gh --version
gh version 2.5.1 (2022-02-17)
https://github.com/cli/cli/releases/tag/v2.5.1
Steps to reproduce the behavior
Run gh api --paginate repos/torvalds/linux/tags
Scroll up to find that the output contains multiple arrays instead of one. (it is easier to see this by piping it into jq: ... | jq -r '[ .[].name ]'
Expected vs actual behavior
I would have expected the pagination to have been abstracted away and the output from the gh command to be a single, continuous JSON array.
Logs
Output of running the following command:
gh api --paginate repos/torvalds/linux/tags | jq -r '[ .[].name ]'
I realized that I had an earlier version of gh (through my system package manager), but when I downloaded the latest release, I confirmed it is still an issue:
@wheelerlaw Thanks for writing in. This is a known issue with the gh api command. Closing as duplicate of #1268. Please add any additional context/questions/comments to that thread.
Describe the bug
When I use the
--paginate
option, I would expect it to yield a single, continuous JSON array. Instead, it is returning multiple arrays, each ~100 items long.gh
version:Steps to reproduce the behavior
gh api --paginate repos/torvalds/linux/tags
jq
:... | jq -r '[ .[].name ]'
Expected vs actual behavior
I would have expected the pagination to have been abstracted away and the output from the
gh
command to be a single, continuous JSON array.Logs
Output of running the following command:
command output
expected output
The text was updated successfully, but these errors were encountered: