From b9e72373fbe3001d98ce7395221d0134b9456679 Mon Sep 17 00:00:00 2001 From: Richard Mahn Date: Mon, 4 Feb 2019 21:58:10 -0700 Subject: [PATCH] Updates GitTreeResponse for pagination (#141) * Updates GitTreeResponse for pagination * Removes TotalPages --- gitea/repo_tree.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gitea/repo_tree.go b/gitea/repo_tree.go index cef3c64..842ab9b 100644 --- a/gitea/repo_tree.go +++ b/gitea/repo_tree.go @@ -20,10 +20,12 @@ type GitEntry struct { // GitTreeResponse returns a git tree type GitTreeResponse struct { - SHA string `json:"sha"` - URL string `json:"url"` - Entries []GitEntry `json:"tree"` - Truncated bool `json:"truncated"` + SHA string `json:"sha"` + URL string `json:"url"` + Entries []GitEntry `json:"tree"` + Truncated bool `json:"truncated"` + Page int `json:"page"` + TotalCount int `json:"total_count"` } // GetTrees downloads a file of repository, ref can be branch/tag/commit.