Exposes in API the Repo entity's Size and IsBare property (#1668)

* Exposes in API the Repo entity's IsBare property as IsEmpty

Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>

* Exposes in API the Repo entity's Size property

Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
This commit is contained in:
guyzmo 2017-05-05 04:55:54 +02:00 committed by Lunny Xiao
parent a503947fba
commit 98460a8d9d
4 changed files with 49 additions and 3 deletions

View file

@ -285,6 +285,8 @@ func (repo *Repository) APIFormat(mode AccessMode) *api.Repository {
FullName: repo.FullName(),
Description: repo.Description,
Private: repo.IsPrivate,
Empty: repo.IsBare,
Size: int(repo.Size/1024),
Fork: repo.IsFork,
Mirror: repo.IsMirror,
HTMLURL: repo.HTMLURL(),