Skip to content

502 for gh pr list on large repository #4152

@dflynn15

Description

@dflynn15

Describe the bug

When running gh pr list -s closed I am getting a 502 API response. This only is happening with a repository with 100k+ closed PRs. Adding the limit option with gh pr list -s closed -l 5 does not bypass this either.

❯ gh --version
gh version 1.14.0 (2021-08-04)

Steps to reproduce the behavior

Given a Repository with a closed PR count over 100k

  1. gh pr list -s closed
  2. See error:
HTTP 502:  (https://api.github.com/graphql)
.

Expected vs actual behavior

I should be able to see 5 closed PRs. Instead I am getting a 502

Logs

Redacted owner and repository name.

❯ gh pr list -s closed
HTTP 502:  (https://api.github.com/graphql)
. 
❯ gh pr list -s open

Showing 30 of 1032 open pull requests in owner/repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedbugSomething isn't workinggh-prrelating to the gh pr commandplatformProblems with the GitHub platform rather than the CLI clientpriority-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