@@ -28,6 +28,7 @@ type ListOptions struct {
2828 BaseBranch string
2929 Labels []string
3030 Assignee string
31+ Search string
3132}
3233
3334func NewCmdList (f * cmdutil.Factory , runF func (* ListOptions ) error ) * cobra.Command {
@@ -40,9 +41,8 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman
4041 Use : "list" ,
4142 Short : "List and filter pull requests in this repository" ,
4243 Example : heredoc .Doc (`
43- $ gh pr list --limit 999
44- $ gh pr list --state closed
45- $ gh pr list --label "priority 1" --label "bug"
44+ $ gh pr list --label bug --label "priority 1"
45+ $ gh pr list --search "status:success review:required"
4646 $ gh pr list --web
4747 ` ),
4848 Args : cmdutil .NoArgsQuoteReminder ,
@@ -67,6 +67,7 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman
6767 cmd .Flags ().StringVarP (& opts .BaseBranch , "base" , "B" , "" , "Filter by base branch" )
6868 cmd .Flags ().StringSliceVarP (& opts .Labels , "label" , "l" , nil , "Filter by labels" )
6969 cmd .Flags ().StringVarP (& opts .Assignee , "assignee" , "a" , "" , "Filter by assignee" )
70+ cmd .Flags ().StringVarP (& opts .Search , "search" , "S" , "" , "Search pull requests with `query`" )
7071
7172 return cmd
7273}
@@ -88,6 +89,7 @@ func listRun(opts *ListOptions) error {
8889 Assignee : opts .Assignee ,
8990 Labels : opts .Labels ,
9091 BaseBranch : opts .BaseBranch ,
92+ Search : opts .Search ,
9193 }
9294
9395 if opts .WebMode {
0 commit comments