summaryrefslogtreecommitdiffstats
path: root/modules/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-01-10 17:34:21 +0800
committerGitHub <noreply@github.com>2020-01-10 17:34:21 +0800
commit99d869fa63e07780f1a17d1a9599187b9b689d9b (patch)
treeecadeba077cf0ae58d0a21f232d280fec60c779a /modules/templates
parent384c2b342ec01fadb520572666127cb5564e1050 (diff)
downloadgitea-99d869fa63e07780f1a17d1a9599187b9b689d9b.tar.gz
gitea-99d869fa63e07780f1a17d1a9599187b9b689d9b.zip
Move push commits from models to modules/repository (#9370)
* Move push commits from models to modules/repository * fix test * fix test * fix test * fix test * fix test Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'modules/templates')
-rw-r--r--modules/templates/helper.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index c3c92f856b..a9fc652ca9 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -27,6 +27,7 @@ import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/markup"
+ "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/util"
@@ -579,8 +580,8 @@ func ActionIcon(opType models.ActionType) string {
}
// ActionContent2Commits converts action content to push commits
-func ActionContent2Commits(act Actioner) *models.PushCommits {
- push := models.NewPushCommits()
+func ActionContent2Commits(act Actioner) *repository.PushCommits {
+ push := repository.NewPushCommits()
if err := json.Unmarshal([]byte(act.GetContent()), push); err != nil {
log.Error("json.Unmarshal:\n%s\nERROR: %v", act.GetContent(), err)
}