mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
feat(repo): show repository columns, state and README
repo list and search repo printed bare names. They now render a table with NAME, DESCRIPTION, INFO (public or private, fork, mirror, template, archived, empty) and UPDATED under "Showing N of M repositories ...", an empty-state message on stderr, and tab-separated rows with the URL when piped. --type, --sort and --order complete and validate their values. repo view shows the visibility and kind badges, stars, forks, open issues and pull requests, the parent of a fork, the source of a mirror, the default branch and the clone URLs, followed by the README of the default branch (or --branch), rendered on a terminal. The repository JSON gains empty, stars_count, forks_count, open_issues_count, open_pr_count, topics and updated_at. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
10 files changed
+456
-152
No files matched your search
@@ -26,6 +26,8 @@ func repositoryFrom(repo *gitea.Repository) Repository {
|
||||
FullName: repo.FullName, Description: repo.Description, URL: repo.HTMLURL, Private: repo.Private,
|
||||
DefaultBranch: repo.DefaultBranch, CloneURL: repo.CloneURL, SSHURL: repo.SSHURL,
|
||||
Archived: repo.Archived, Template: repo.Template, Fork: repo.Fork, Mirror: repo.Mirror, OriginalURL: repo.OriginalURL,
|
||||
Empty: repo.Empty, Stars: repo.Stars, Forks: repo.Forks, OpenIssues: repo.OpenIssues, OpenPulls: repo.OpenPulls,
|
||||
Topics: repo.Topics, UpdatedAt: timestamp(repo.Updated),
|
||||
}
|
||||
if repo.Parent != nil {
|
||||
parent := repositoryFrom(repo.Parent)
|
||||
|
||||
Reference in new issue
Block a user