aboutsummaryrefslogtreecommitdiffstats
path: root/services/migrations
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-03-31 17:20:39 +0800
committerGitHub <noreply@github.com>2022-03-31 17:20:39 +0800
commitd4f84f1c937e24e71aa5f05c58d440cde741450f (patch)
tree18571ad08fabe6d1090ea4d2674beab3b1c00a6e /services/migrations
parent43332a483f7838df66e0209eb9c15d4aba3d5874 (diff)
downloadgitea-d4f84f1c937e24e71aa5f05c58d440cde741450f.tar.gz
gitea-d4f84f1c937e24e71aa5f05c58d440cde741450f.zip
Move reaction to models/issues/ (#19264)
* Move reaction to models/issues/ * Fix test * move the function * improve code * Update models/issues/reaction.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'services/migrations')
-rw-r--r--services/migrations/gitea_uploader.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/migrations/gitea_uploader.go b/services/migrations/gitea_uploader.go
index 82e57e296d..7332498151 100644
--- a/services/migrations/gitea_uploader.go
+++ b/services/migrations/gitea_uploader.go
@@ -18,6 +18,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/foreignreference"
+ issues_model "code.gitea.io/gitea/models/issues"
repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/git"
@@ -392,7 +393,7 @@ func (g *GiteaLocalUploader) CreateIssues(issues ...*base.Issue) error {
}
// add reactions
for _, reaction := range issue.Reactions {
- res := models.Reaction{
+ res := issues_model.Reaction{
Type: reaction.Content,
CreatedUnix: timeutil.TimeStampNow(),
}
@@ -448,7 +449,7 @@ func (g *GiteaLocalUploader) CreateComments(comments ...*base.Comment) error {
// add reactions
for _, reaction := range comment.Reactions {
- res := models.Reaction{
+ res := issues_model.Reaction{
Type: reaction.Content,
CreatedUnix: timeutil.TimeStampNow(),
}
@@ -646,7 +647,7 @@ func (g *GiteaLocalUploader) newPullRequest(pr *base.PullRequest) (*models.PullR
// add reactions
for _, reaction := range pr.Reactions {
- res := models.Reaction{
+ res := issues_model.Reaction{
Type: reaction.Content,
CreatedUnix: timeutil.TimeStampNow(),
}