make automatic pagination on search optional, fix tests

This commit is contained in:
Cory Bennett
2019-05-25 17:06:03 -07:00
parent 58a300422b
commit 36c99ce040
4 changed files with 51 additions and 22 deletions
+1 -4
View File
@@ -30,9 +30,6 @@ func CmdListRegistry() *jiracli.CommandRegistryEntry {
return CmdListUsage(cmd, &opts, fig)
},
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
if opts.MaxResults == 0 {
opts.MaxResults = 500
}
if opts.QueryFields == "" {
opts.QueryFields = "assignee,created,priority,reporter,status,summary,updated,issuetype"
}
@@ -72,7 +69,7 @@ func CmdListUsage(cmd *kingpin.CmdClause, opts *ListOptions, fig *figtree.FigTre
// List will query jira and send data to "list" template
func CmdList(o *oreo.Client, globals *jiracli.GlobalOptions, opts *ListOptions) error {
data, err := jira.Search(o, globals.Endpoint.Value, opts)
data, err := jira.Search(o, globals.Endpoint.Value, opts, jira.WithAutoPagination())
if err != nil {
return err
}