improve formatting of tea repos (#223)

make fmt

code review

use OutputMarkdown

use FormatTime()

improved repo printing

- ReposList() now allows selection of fields
- RepoDetail() uses glamour and provides more details

Co-authored-by: Norwin Roosen <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/223
Reviewed-by: 6543 <6543@noreply.gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-Authored-By: Norwin <noerw@noreply.gitea.io>
Co-Committed-By: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
Norwin
2020-10-10 01:17:31 +00:00
committed by Lunny Xiao
parent a4b792e24d
commit 6ea331ce3b
4 changed files with 143 additions and 44 deletions

View File

@ -50,6 +50,7 @@ var CmdReposSearch = cli.Command{
Required: false,
Usage: "Filter archived repos (true|false)",
},
&printFieldsFlag,
&flags.PaginationPageFlag,
&flags.PaginationLimitFlag,
}, flags.LoginOutputFlags...),
@ -122,6 +123,6 @@ func runReposSearch(ctx *cli.Context) error {
return err
}
print.ReposList(rps)
print.ReposList(rps, getFields(ctx))
return nil
}