-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move more functions to db.Find #28419
Conversation
Something seems to have changed:
|
Sounds a bit like this PR is doomed to never be merged? |
Maybe blocked by #28659 |
Ping for other reviewers |
Last call @go-gitea/technical-oversight-committee |
findOptions := repo_model.FindReleasesOptions{ | ||
IncludeDrafts: true, | ||
IncludeTags: true, | ||
RepoID: mirror.ID, | ||
} | ||
initCount, err := db.Count[repo_model.Release](db.DefaultContext, findOptions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findOptions := repo_model.FindReleasesOptions{ | |
IncludeDrafts: true, | |
IncludeTags: true, | |
RepoID: mirror.ID, | |
} | |
initCount, err := db.Count[repo_model.Release](db.DefaultContext, findOptions) | |
initCount, err := db.Count[repo_model.Release](db.DefaultContext, repo_model.FindReleasesOptions{ | |
IncludeDrafts: true, | |
IncludeTags: true, | |
RepoID: mirror.ID, | |
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findOptions
will be reused on following code.
* giteaofficial/main: (34 commits) Use refname:strip-2 instead of refname:short when syncing tags (go-gitea#28797) Add gist to comparison (go-gitea#28809) Fix links in issue card (go-gitea#28806) Show latest commit for file (go-gitea#28067) Add ability to see open and closed issues at the same time (go-gitea#28757) Display latest sync time for pull mirrors on the repo page (go-gitea#28712) Fix `GetCommitStatuses` (go-gitea#28787) Caller should check the ResponseExtra.HasError() first to see whether the request fails (go-gitea#28796) Rework markup link rendering (go-gitea#26745) Fix nil pointer panic when exec some gitea cli command (go-gitea#28791) Add branch protection setting for ignoring stale approvals (go-gitea#28498) Forbid removing the last admin user (go-gitea#28337) Fix when private user following user, private user will not be counted in his own view (go-gitea#28037) Update github.com/cloudflare/circl (go-gitea#28789) Move more functions to db.Find (go-gitea#28419) Add non-JS fallback for reaction tooltips (go-gitea#28785) Modernize merge button (go-gitea#28140) Warn that `DISABLE_QUERY_AUTH_TOKEN` is false only if it's explicitly defined (go-gitea#28783) Speed up loading the dashboard on mysql/mariadb (go-gitea#28546) Fix schedule tasks bugs (go-gitea#28691) ...
Following go-gitea#28220 This PR move more functions to use `db.Find`. --------- Co-authored-by: delvh <[email protected]>
Following go-gitea#28220 This PR move more functions to use `db.Find`. --------- Co-authored-by: delvh <[email protected]>
Following #28220
This PR move more functions to use
db.Find
.