aboutsummaryrefslogtreecommitdiffstats
path: root/services/task
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-09-08 12:51:15 +0800
committerGitHub <noreply@github.com>2023-09-08 04:51:15 +0000
commit4f32abaf941ba30ade1f96930a05d14f1c6a6782 (patch)
tree9351b7d654b20db032867041b0292924ec93bb3f /services/task
parent3c0c27965836328abd2668dcd77710ee2460535e (diff)
downloadgitea-4f32abaf941ba30ade1f96930a05d14f1c6a6782.tar.gz
gitea-4f32abaf941ba30ade1f96930a05d14f1c6a6782.zip
move repository deletion to service layer (#26948)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'services/task')
-rw-r--r--services/task/task.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/task/task.go b/services/task/task.go
index 45bc7b990a..3a40faef90 100644
--- a/services/task/task.go
+++ b/services/task/task.go
@@ -7,6 +7,7 @@ import (
"fmt"
admin_model "code.gitea.io/gitea/models/admin"
+ "code.gitea.io/gitea/models/db"
repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/graceful"
@@ -100,7 +101,7 @@ func CreateMigrateTask(doer, u *user_model.User, opts base.MigrateOptions) (*adm
return nil, err
}
- repo, err := repo_service.CreateRepositoryDirectly(doer, u, repo_service.CreateRepoOptions{
+ repo, err := repo_service.CreateRepositoryDirectly(db.DefaultContext, doer, u, repo_service.CreateRepoOptions{
Name: opts.RepoName,
Description: opts.Description,
OriginalURL: opts.OriginalURL,