mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 19:11:25 +01:00
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:
6 files changed
+120
-58
No files matched your search
@@ -62,15 +62,6 @@ func trimNames(lists ...[]string) {
|
||||
}
|
||||
}
|
||||
|
||||
// labelFilter splits a comma-separated label filter, trimming entries and rejecting blanks.
|
||||
func labelFilter(raw string) ([]string, error) {
|
||||
if raw == "" {
|
||||
return nil, nil
|
||||
}
|
||||
names := strings.Split(raw, ",")
|
||||
return names, requireNames("label", "", names)
|
||||
}
|
||||
|
||||
// oneOf rejects an enum flag value outside allowed, which needs at least two entries.
|
||||
func oneOf(flag, value string, allowed ...string) error {
|
||||
if slices.Contains(allowed, value) {
|
||||
|
||||
Reference in new issue
Block a user