mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-19 11:00:02 +02:00
Move more functions to db.Find (#28419)
Following #28220 This PR move more functions to use `db.Find`. --------- Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
parent
e5313248a8
commit
70c4aad8e1
36 changed files with 305 additions and 238 deletions
|
@ -299,10 +299,11 @@ func SyncReleasesWithTags(ctx context.Context, repo *repo_model.Repository, gitR
|
|||
IncludeDrafts: true,
|
||||
IncludeTags: true,
|
||||
ListOptions: db.ListOptions{PageSize: 50},
|
||||
RepoID: repo.ID,
|
||||
}
|
||||
for page := 1; ; page++ {
|
||||
opts.Page = page
|
||||
rels, err := repo_model.GetReleasesByRepoID(gitRepo.Ctx, repo.ID, opts)
|
||||
rels, err := db.Find[repo_model.Release](gitRepo.Ctx, opts)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to GetReleasesByRepoID in Repo[%d:%s/%s]: %w", repo.ID, repo.OwnerName, repo.Name, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue