From 98460a8d9d9b2bcd31871837ac61d70b153df9c4 Mon Sep 17 00:00:00 2001 From: guyzmo Date: Fri, 5 May 2017 04:55:54 +0200 Subject: 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 * Exposes in API the Repo entity's Size property Signed-off-by: Guyzmo --- models/repo.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'models') 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(), -- cgit v1.2.3