feat(search): gh-style issue and pull request search tables

search issue and search pr printed rows without a header, showed merged
pull requests as closed and never said that more results exist. They now
show REPO#ID TITLE STATE AUTHOR UPDATED under a context line that counts
the matches and points at the next page, are also search issues and
search prs, take -s -L -A -l -m and @me, and use --until for --before,
which still works. Search results gain an author JSON field.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-12 00:17:07 +02:00
1 parent e5796af9e9
commit f6a0d18b8a
6 files changed
+120 -58

No files matched your search

+1 -1
View File
@@ -189,7 +189,7 @@ func TestUsageErrorsPrecedeRequests(t *testing.T) {
{[]string{"search", "issue", "query", "--author", "alice", "--authored"}, "--author and --authored are mutually exclusive"},
{[]string{"search", "issue", "--label", ","}, "label names cannot be empty"},
{[]string{"search", "pr", "query", "--since", "invalid"}, "--since: use a date, RFC3339 timestamp, or duration such as 24h"},
{[]string{"search", "pr", "query", "--since", "2026-01-02T00:00:00Z", "--before", "2026-01-01T00:00:00Z"}, "--since must not be later than --before"},
{[]string{"search", "pr", "query", "--since", "2026-01-02T00:00:00Z", "--before", "2026-01-01T00:00:00Z"}, "--since must not be later than --until"},
{[]string{"search", "issue", "--since="}, "invalid --since: use a date"},
{[]string{"search", "repo", "query", "--sort", "invalid"}, "--sort must be alpha, created, updated, size, or id"},
{[]string{"search", "repo", "query", "--order", "invalid"}, "--order must be asc or desc"},