Skip to content

Rest pagination does not work properly with page query parameter #4540

@3b3ziz

Description

@3b3ziz

Describe the bug

Pagination does not work when using page query param as it keeps getting the same page infinitely.
Version: gh version 2.1.0 (2021-10-14)

Steps to reproduce the behavior

  1. Type this gh api -X GET repos/cli/cli/releases -f per_page=10 -f page=3 --paginate --jq '.[].tag_name'
  2. View the output v1.9.1 v1.9.0 v1.8.1 v1.8.0 v1.7.0 v1.6.2 v1.6.1 v1.6.0 v1.5.0 v1.4.0 v1.9.1 v1.9.0 v1.8.1 v1.8.0 v1.7.0 v1.6.2 v1.6.1 v1.6.0 v1.5.0 v1.4.0 v1.9.1 v1.9.0 v1.8.1 v1.8.0 v1.7.0 v1.6.2 v1.6.1 v1.6.0 v1.5.0 v1.4.0 v1.9.1 v1.9.0 v1.8.1 v1.8.0 v1.7.0 v1.6.2 v1.6.1 v1.6.0 v1.5.0 v1.4.0 ...

Expected vs actual behavior

A clear and concise description of what you expected to happen and what actually happened.
It should get the next pages rather than getting the same page over and over.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions