cli / cli/cli

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

Open
#11,111 5 comments 1 reaction 0 assignees View on GitHub
enhancement gh-pr needs-design needs-investigation
Dominant language
Go
Stars
46.3k
Forks
9k
Avg merge
2d 9h
Merged PRs (30d)
89

Description

### 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:

```sh
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.