Skip to content

gh pr list --help examples do not work #4230

@Jernik

Description

@Jernik

Describe the bug

I ran gh pr list --help because I wanted to look at just my PRs. I then ran the provided examples for filtering PRs authored and assigned to me, and got an error of flag needs an argument: --author

Steps to reproduce the behavior

  1. Run the command gh pr list --assignee @me
  2. View the output:
flag needs an argument: --assignee

Usage:  gh pr list [flags]

Expected vs actual behavior

I expected to be able to run the examples and have them work for me. They did not work for me

Logs

PS C:/gitrepo> gh pr list --help
List and filter pull requests in this repository

For more information about output formatting flags, see `gh help formatting`.

USAGE
  gh pr list [flags]

FLAGS
  -a, --assignee string   Filter by assignee
  -A, --author string     Filter by author
  -B, --base string       Filter by base branch
  -q, --jq expression     Filter JSON output using a jq expression
      --json fields       Output JSON with the specified fields
  -l, --label strings     Filter by labels
  -L, --limit int         Maximum number of items to fetch (default 30)
  -S, --search query      Search pull requests with query
  -s, --state string      Filter by state: {open|closed|merged|all} (default "open")
  -t, --template string   Format JSON output using a Go template
  -w, --web               Open the browser to list the pull requests

INHERITED FLAGS
      --help                     Show help for command
  -R, --repo [HOST/]OWNER/REPO   Select another repository using the [HOST/]OWNER/REPO format

EXAMPLES
  List PRs authored by you
  $ gh pr list --author @me

  List PRs assigned to you
  $ gh pr list --assignee @me

  List PRs by label, combining multiple labels with AND
  $ gh pr list --label bug --label "priority 1"

  List PRs using search syntax
  $ gh pr list --search "status:success review:required"

  Open the list of PRs in a web browser
  $ gh pr list --web


LEARN MORE
  Use 'gh <command> <subcommand> --help' for more information about a command.
  Read the manual at https://cli.github.com/manual

PS C:/gitrepo> gh pr list --author @me
flag needs an argument: --author

Usage:  gh pr list [flags]

Flags:
  -a, --assignee string   Filter by assignee
  -A, --author string     Filter by author
  -B, --base string       Filter by base branch
  -q, --jq expression     Filter JSON output using a jq expression
      --json fields       Output JSON with the specified fields
  -l, --label strings     Filter by labels
  -L, --limit int         Maximum number of items to fetch (default 30)
  -S, --search query      Search pull requests with query
  -s, --state string      Filter by state: {open|closed|merged|all} (default "open")
  -t, --template string   Format JSON output using a Go template
  -w, --web               Open the browser to list the pull requests

PS C:/gitrepo> gh pr list --author @me
flag needs an argument: --author

Usage:  gh pr list [flags]

Flags:
  -a, --assignee string   Filter by assignee
  -A, --author string     Filter by author
  -B, --base string       Filter by base branch
  -q, --jq expression     Filter JSON output using a jq expression
      --json fields       Output JSON with the specified fields
  -l, --label strings     Filter by labels
  -L, --limit int         Maximum number of items to fetch (default 30)
  -S, --search query      Search pull requests with query
  -s, --state string      Filter by state: {open|closed|merged|all} (default "open")
  -t, --template string   Format JSON output using a Go template
  -w, --web               Open the browser to list the pull requests

PS C:/gitrepo> gh pr list --assignee @me
flag needs an argument: --assignee

Usage:  gh pr list [flags]

Flags:
  -a, --assignee string   Filter by assignee
  -A, --author string     Filter by author
  -B, --base string       Filter by base branch
  -q, --jq expression     Filter JSON output using a jq expression
      --json fields       Output JSON with the specified fields
  -l, --label strings     Filter by labels
  -L, --limit int         Maximum number of items to fetch (default 30)
  -S, --search query      Search pull requests with query
  -s, --state string      Filter by state: {open|closed|merged|all} (default "open")
  -t, --template string   Format JSON output using a Go template
  -w, --web               Open the browser to list the pull requests

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions