Skip to content

Commit c927ea4

Browse files
authored
Merge pull request cli#10979 from cli/babakks/improve-pr-list-docs
Add example usage of `--head` option to `pr list` docs
2 parents 01a1859 + aa64bb5 commit c927ea4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pkg/cmd/pr/list/list.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman
6464
# List PRs authored by you
6565
$ gh pr list --author "@me"
6666
67+
# List PRs with a specific head branch name
68+
$ gh pr list --head "typo"
69+
6770
# List only PRs with all of the given labels
6871
$ gh pr list --label bug --label "priority 1"
6972
@@ -102,7 +105,7 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman
102105
cmd.Flags().IntVarP(&opts.LimitResults, "limit", "L", 30, "Maximum number of items to fetch")
103106
cmdutil.StringEnumFlag(cmd, &opts.State, "state", "s", "open", []string{"open", "closed", "merged", "all"}, "Filter by state")
104107
cmd.Flags().StringVarP(&opts.BaseBranch, "base", "B", "", "Filter by base branch")
105-
cmd.Flags().StringVarP(&opts.HeadBranch, "head", "H", "", "Filter by head branch")
108+
cmd.Flags().StringVarP(&opts.HeadBranch, "head", "H", "", `Filter by head branch ("<owner>:<branch>" syntax not supported)`)
106109
cmd.Flags().StringSliceVarP(&opts.Labels, "label", "l", nil, "Filter by label")
107110
cmd.Flags().StringVarP(&opts.Author, "author", "A", "", "Filter by author")
108111
cmd.Flags().StringVar(&appAuthor, "app", "", "Filter by GitHub App author")

0 commit comments

Comments
 (0)