diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-18 13:58:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 13:58:42 +0800 |
commit | 3c3855a05c79ccc7a8495cdbf4a361e7bef74248 (patch) | |
tree | 43f8616bca25a09c0e284e9407819ba43a6a0d79 /services/migrations/migrate.go | |
parent | 6874fe90e591fa1bfb4b0575b27d876ab544e6e0 (diff) | |
download | gitea-3c3855a05c79ccc7a8495cdbf4a361e7bef74248.tar.gz gitea-3c3855a05c79ccc7a8495cdbf4a361e7bef74248.zip |
Move user functions into user.go (#17659)
* Move user functions into user.go
* Fix test
Diffstat (limited to 'services/migrations/migrate.go')
-rw-r--r-- | services/migrations/migrate.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/migrations/migrate.go b/services/migrations/migrate.go index 21be2d3b0d..e6d5e8e4cc 100644 --- a/services/migrations/migrate.go +++ b/services/migrations/migrate.go @@ -14,6 +14,7 @@ import ( "strings" "code.gitea.io/gitea/models" + admin_model "code.gitea.io/gitea/models/admin" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/matchlist" base "code.gitea.io/gitea/modules/migration" @@ -122,7 +123,7 @@ func MigrateRepository(ctx context.Context, doer *models.User, ownerName string, if err1 := uploader.Rollback(); err1 != nil { log.Error("rollback failed: %v", err1) } - if err2 := models.CreateRepositoryNotice(fmt.Sprintf("Migrate repository from %s failed: %v", opts.OriginalURL, err)); err2 != nil { + if err2 := admin_model.CreateRepositoryNotice(fmt.Sprintf("Migrate repository from %s failed: %v", opts.OriginalURL, err)); err2 != nil { log.Error("create respotiry notice failed: ", err2) } return nil, err |