`gh pr checkout` default should be the same as `gh pr list`, and optionally also support `--limit` · Issue #11111 · cli/cli · GitHub
Skip to content

gh pr checkout default should be the same as gh pr list, and optionally also support --limit #11111

Description

@kahlstrm

Describe the feature or problem you’d like to solve

Before gh pr checkout had the interactive mode support added, I had a DIY version of it:

gh pr list | fzf | awk '{print $1}' | xargs gh pr checkout

That worked quite well, but I have started using gh pr checkout interactive mode instead.

However, I noticed that the number of PRs listed with the new interactive mode is limited to 10, and that value is hardcoded. In contrast, the old version's default seems to be 30 and can even be overridden with the --limit flag.

Proposed solution

Either change the default limit to match gh pr list, add --limit support to gh pr checkout interactive mode, or both.

How will it benefit CLI and its users?
Users can have a more flexible way of using the gh pr checkout interactive mode.

Additional Context

I have already a local checkout with these changes, but noticed the CONTRIBUTING.md after implementing this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIgh-prrelating to the gh pr commandneeds-designAn engineering task needs design to proceedneeds-investigationCLI team needs to investigate

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions