diff options
Diffstat (limited to 'modules/repository')
-rw-r--r-- | modules/repository/create_test.go | 2 | ||||
-rw-r--r-- | modules/repository/repo.go | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/modules/repository/create_test.go b/modules/repository/create_test.go index 53c0b0f305..ee76d2181b 100644 --- a/modules/repository/create_test.go +++ b/modules/repository/create_test.go @@ -19,7 +19,7 @@ func TestIncludesAllRepositoriesTeams(t *testing.T) { testTeamRepositories := func(teamID int64, repoIds []int64) { team := models.AssertExistsAndLoadBean(t, &models.Team{ID: teamID}).(*models.Team) - assert.NoError(t, team.GetRepositories(), "%s: GetRepositories", team.Name) + assert.NoError(t, team.GetRepositories(&models.SearchTeamOptions{}), "%s: GetRepositories", team.Name) assert.Len(t, team.Repos, team.NumRepos, "%s: len repo", team.Name) assert.Equal(t, len(repoIds), len(team.Repos), "%s: repo count", team.Name) for i, rid := range repoIds { 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) } |