From 12cb84b97fc10184a9c41c6a3b2b839e018db0b3 Mon Sep 17 00:00:00 2001 From: lstahlman Date: Sun, 10 Jul 2016 16:56:15 -0700 Subject: [PATCH] Extend the API to include more repository properties (#3249) Adds description, stars_count, forks_count, watchers_count and open_issues_count. --- routers/api/v1/convert/convert.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/routers/api/v1/convert/convert.go b/routers/api/v1/convert/convert.go index 8eca5f4ec68..0bd22f57625 100644 --- a/routers/api/v1/convert/convert.go +++ b/routers/api/v1/convert/convert.go @@ -45,11 +45,16 @@ func ToRepository(owner *models.User, repo *models.Repository, permission api.Pe ID: repo.ID, Owner: ToUser(owner), FullName: owner.Name + "/" + repo.Name, + Description: repo.Description, Private: repo.IsPrivate, Fork: repo.IsFork, HtmlUrl: setting.AppUrl + owner.Name + "/" + repo.Name, CloneUrl: cl.HTTPS, SshUrl: cl.SSH, + OpenIssues: repo.NumOpenIssues, + Stars: repo.NumStars, + Forks: repo.NumForks, + Watchers: repo.NumWatches, Permissions: permission, } }