Merge pull request #11651 from cli/kw/agent-task-list-pager

`gh agent-task list`: pager support
This commit is contained in:
Babak K. Shandiz 2025-09-03 10:14:17 +01:00 committed by GitHub
commit d39c8c2fe1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -133,6 +133,12 @@ func listRun(opts *ListOptions) error {
return cmdutil.NewNoResultsError("no agent tasks found")
}
if err := opts.IO.StartPager(); err == nil {
defer opts.IO.StopPager()
} else {
fmt.Fprintf(opts.IO.ErrOut, "error starting pager: %v\n", err)
}
cs := opts.IO.ColorScheme()
tp := tableprinter.New(opts.IO, tableprinter.WithHeader("Session ID", "Pull Request", "Repo", "Session State", "Created"))
for _, s := range sessions {