diff options
author | guyzmo <guyzmo+github+pub@m0g.net> | 2017-05-05 04:55:54 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-05-05 10:55:54 +0800 |
commit | 98460a8d9d9b2bcd31871837ac61d70b153df9c4 (patch) | |
tree | 49a79dc74678e5488e10fc58234288339a77b6f6 /models/repo.go | |
parent | a503947fba7b9cd81bf52305c58f11a4a0d93df5 (diff) | |
download | gitea-98460a8d9d9b2bcd31871837ac61d70b153df9c4.tar.gz gitea-98460a8d9d9b2bcd31871837ac61d70b153df9c4.zip |
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>
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go index 682dbf65a7..d29df1b24e 100644 --- a/models/repo.go +++ b/models/repo.go @@ -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(), |