diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/admin.go | 4 | ||||
-rw-r--r-- | cmd/migrate_storage_test.go | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/cmd/admin.go b/cmd/admin.go index a4f48b0513..d49dcf13cb 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -389,7 +389,7 @@ func runRepoSyncReleases(_ *cli.Context) error { } log.Trace(" currentNumReleases is %d, running SyncReleasesWithTags", oldnum) - if err = repo_module.SyncReleasesWithTags(repo, gitRepo); err != nil { + if err = repo_module.SyncReleasesWithTags(ctx, repo, gitRepo); err != nil { log.Warn(" SyncReleasesWithTags: %v", err) gitRepo.Close() continue @@ -438,7 +438,7 @@ func runRegenerateKeys(_ *cli.Context) error { if err := initDB(ctx); err != nil { return err } - return asymkey_model.RewriteAllPublicKeys() + return asymkey_model.RewriteAllPublicKeys(ctx) } func parseOAuth2Config(c *cli.Context) *oauth2.Source { diff --git a/cmd/migrate_storage_test.go b/cmd/migrate_storage_test.go index 644e0dc18b..5d8c867993 100644 --- a/cmd/migrate_storage_test.go +++ b/cmd/migrate_storage_test.go @@ -9,6 +9,7 @@ import ( "strings" "testing" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/packages" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" @@ -30,7 +31,7 @@ func TestMigratePackages(t *testing.T) { assert.NoError(t, err) defer buf.Close() - v, f, err := packages_service.CreatePackageAndAddFile(&packages_service.PackageCreationInfo{ + v, f, err := packages_service.CreatePackageAndAddFile(db.DefaultContext, &packages_service.PackageCreationInfo{ PackageInfo: packages_service.PackageInfo{ Owner: creator, PackageType: packages.TypeGeneric, |