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/gitea_downloader.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/gitea_downloader.go')
-rw-r--r-- | services/migrations/gitea_downloader.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/migrations/gitea_downloader.go b/services/migrations/gitea_downloader.go index 51ef0292df..00180adf41 100644 --- a/services/migrations/gitea_downloader.go +++ b/services/migrations/gitea_downloader.go @@ -15,7 +15,7 @@ import ( "strings" "time" - "code.gitea.io/gitea/models" + admin_model "code.gitea.io/gitea/models/admin" "code.gitea.io/gitea/modules/log" base "code.gitea.io/gitea/modules/migration" "code.gitea.io/gitea/modules/proxy" @@ -417,7 +417,7 @@ func (g *GiteaDownloader) GetIssues(page, perPage int) ([]*base.Issue, bool, err reactions, err := g.getIssueReactions(issue.Index) if err != nil { log.Warn("Unable to load reactions during migrating issue #%d to %s/%s. Error: %v", issue.Index, g.repoOwner, g.repoName, err) - if err2 := models.CreateRepositoryNotice( + if err2 := admin_model.CreateRepositoryNotice( fmt.Sprintf("Unable to load reactions during migrating issue #%d to %s/%s. Error: %v", issue.Index, g.repoOwner, g.repoName, err)); err2 != nil { log.Error("create repository notice failed: ", err2) } @@ -479,7 +479,7 @@ func (g *GiteaDownloader) GetComments(opts base.GetCommentOptions) ([]*base.Comm reactions, err := g.getCommentReactions(comment.ID) if err != nil { log.Warn("Unable to load comment reactions during migrating issue #%d for comment %d to %s/%s. Error: %v", opts.Context.ForeignID(), comment.ID, g.repoOwner, g.repoName, err) - if err2 := models.CreateRepositoryNotice( + if err2 := admin_model.CreateRepositoryNotice( fmt.Sprintf("Unable to load reactions during migrating issue #%d for comment %d to %s/%s. Error: %v", opts.Context.ForeignID(), comment.ID, g.repoOwner, g.repoName, err)); err2 != nil { log.Error("create repository notice failed: ", err2) } @@ -557,7 +557,7 @@ func (g *GiteaDownloader) GetPullRequests(page, perPage int) ([]*base.PullReques reactions, err := g.getIssueReactions(pr.Index) if err != nil { log.Warn("Unable to load reactions during migrating pull #%d to %s/%s. Error: %v", pr.Index, g.repoOwner, g.repoName, err) - if err2 := models.CreateRepositoryNotice( + if err2 := admin_model.CreateRepositoryNotice( fmt.Sprintf("Unable to load reactions during migrating pull #%d to %s/%s. Error: %v", pr.Index, g.repoOwner, g.repoName, err)); err2 != nil { log.Error("create repository notice failed: ", err2) } |