Skip to content

Commit 98460a8

Browse files
guyzmolunny
authored andcommitted
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 <[email protected]> * Exposes in API the Repo entity's Size property Signed-off-by: Guyzmo <[email protected]>
1 parent a503947 commit 98460a8

File tree

4 files changed

+49
-3
lines changed

4 files changed

+49
-3
lines changed

models/repo.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ func (repo *Repository) APIFormat(mode AccessMode) *api.Repository {
285285
FullName: repo.FullName(),
286286
Description: repo.Description,
287287
Private: repo.IsPrivate,
288+
Empty: repo.IsBare,
289+
Size: int(repo.Size/1024),
288290
Fork: repo.IsFork,
289291
Mirror: repo.IsMirror,
290292
HTMLURL: repo.HTMLURL(),

vendor/code.gitea.io/sdk/gitea/hook.go

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/code.gitea.io/sdk/gitea/repo.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/vendor.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"revisionTime": "2017-05-04T06:58:26Z"
1010
},
1111
{
12-
"checksumSHA1": "vdziKobpPIkU/dLvSI8n7eWrIIE=",
12+
"checksumSHA1": "L58DGmGw5eZThPkaHEaY9vuz42g=",
1313
"path": "code.gitea.io/sdk/gitea",
14-
"revision": "d2f87fd3f9f2887b9f15112cec8d7f53b2825147",
15-
"revisionTime": "2017-04-30T15:33:16Z"
14+
"revision": "1350cdb0d049083453c93dcabfcac2e7ba553951",
15+
"revisionTime": "2017-05-04T17:35:58Z"
1616
},
1717
{
1818
"checksumSHA1": "IyfS7Rbl6OgR83QR7TOfKdDCq+M=",

0 commit comments

Comments
 (0)