summaryrefslogtreecommitdiffstats
path: root/modules/repository/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/repository/repo.go')
-rw-r--r--modules/repository/repo.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/repository/repo.go b/modules/repository/repo.go
index 4ecb9f660a..d57b16c913 100644
--- a/modules/repository/repo.go
+++ b/modules/repository/repo.go
@@ -183,9 +183,10 @@ func CleanUpMigrateInfo(repo *models.Repository) (*models.Repository, error) {
// SyncReleasesWithTags synchronizes release table with repository tags
func SyncReleasesWithTags(repo *models.Repository, gitRepo *git.Repository) error {
existingRelTags := make(map[string]struct{})
- opts := models.FindReleasesOptions{IncludeDrafts: true, IncludeTags: true}
+ opts := models.FindReleasesOptions{IncludeDrafts: true, IncludeTags: true, ListOptions: models.ListOptions{PageSize: 50}}
for page := 1; ; page++ {
- rels, err := models.GetReleasesByRepoID(repo.ID, opts, page, 100)
+ opts.Page = page
+ rels, err := models.GetReleasesByRepoID(repo.ID, opts)
if err != nil {
return fmt.Errorf("GetReleasesByRepoID: %v", err)
}