gh pr list
List and filter pull requests
gh pr list prints the open pull requests for the current repository as a clean table. Filter by author, label, base branch, or a full search query, and add --json to feed the results straight into scripts and dashboards.
gh pr listSyntax
gh pr list [flags]Examples
List open PRs in the current repo
gh pr listOnly your own pull requests
gh pr list --author @meMerged PRs with a specific label
gh pr list --state merged --label bugPRs targeting a release branch
gh pr list --base release-2.0Search with GitHub's query syntax
gh pr list --search "review:required draft:false"Machine-readable output for scripts
gh pr list --json number,title,author --limit 100Options & flags
| Flag | What it does |
|---|---|
| -s, --state | Filter by state: open (default), closed, merged, or all. |
| -A, --author | Filter by author login. Use @me for yourself. |
| -a, --assignee | Filter by assignee. |
| -l, --label | Filter by label (repeatable). |
| -B, --base | Filter by base branch. |
| -S, --search | Search PRs with GitHub search syntax. |
| -L, --limit | Maximum number of items to fetch (default 30). |
| --json | Output specified fields as JSON for scripting. |
| -w, --web | Open the filtered list on github.com. |
How to use gh pr list, step by step
- Run
gh pr listin any GitHub repository to see open PRs. - Narrow the list with filters like
--author @meor--label bug. - Combine filters — they are ANDed together.
- Add
--json number,titleand pipe tojqor--jqfor automation.
Common errors and fixes
no pull requests match your search in OWNER/REPO
The filters returned nothing. Loosen them, or add --state all to include closed and merged PRs.
could not determine base repo: no git remotes found
Run the command inside a cloned repo, or pass --repo owner/name explicitly.
Related commands
Frequently asked questions
How do I list my own pull requests with GitHub CLI?
Use gh pr list --author @me. The @me shortcut resolves to the currently authenticated user, so it works in any repository without typing your username.
How do I export pull requests as JSON?
Add --json with the fields you want, e.g. gh pr list --json number,title,state. Pair it with --jq to filter inside gh, or pipe the output to jq.
Can gh pr list show closed or merged PRs?
Yes. Use --state closed, --state merged, or --state all. The default is open only.