gh pr list

List and filter pull requests in this repository

Synopsis

List and filter pull requests in this repository

gh pr list [flags]

Examples

$ gh pr list --limit 999
$ gh pr list --state closed
$ gh pr list --label "priority 1" --label "bug"

Options

  -a, --assignee string   Filter by assignee
  -B, --base string       Filter by base branch
  -l, --label strings     Filter by label
  -L, --limit int         Maximum number of items to fetch (default 30)
  -s, --state string      Filter by state: {open|closed|merged|all} (default "open")

Options inherited from parent commands

      --help              Show help for command
  -R, --repo OWNER/REPO   Select another repository using the OWNER/REPO format

Examples in use

Default behavior

You will see the most recent 30 open items.

# Viewing a list of open pull requests
~/Projects/my-project$ gh pr list

Pull requests for owner/repo

#14  Upgrade to Prettier 1.19                           prettier
#14  Extend arrow navigation in lists for MacOS         arrow-nav
#13  Add Support for Windows Automatic Dark Mode        dark-mode
#8   Create and use keyboard shortcut react component   shortcut

~/Projects/my-project$

Filtering with flags

You can use flags to filter the list for your specific use cases.

# Viewing a list of closed pull requests assigned to a user
~/Projects/my-project$ gh pr list --state closed --assignee user

Pull requests for owner/repo

#13  Upgrade to Electron 7         electron-7
#8   Release Notes Writing Guide   release-notes

~/Projects/my-project$