mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-05 14:46:19 +00:00
refactor: use WithRepo instead of WithDir for most git operations, clean up model migrations (#38555)
by the way, remove some unnecessary "models" imports from model migration package, fix migration test model init bug (modelmigration/migrationtest/tests.go)
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"gitea.dev/models"
|
||||
git_model "gitea.dev/models/git"
|
||||
"gitea.dev/models/repostats"
|
||||
user_model "gitea.dev/models/user"
|
||||
"gitea.dev/models/webhook"
|
||||
"gitea.dev/modules/git/gitcmd"
|
||||
@@ -69,7 +69,7 @@ func registerCheckRepoStats() {
|
||||
RunAtStart: true,
|
||||
Schedule: "@midnight",
|
||||
}, func(ctx context.Context, _ *user_model.User, _ Config) error {
|
||||
return models.CheckRepoStats(ctx)
|
||||
return repostats.CheckRepoStats(ctx)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user