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>
This commit is contained in:
parent
384c2b342e
commit
99d869fa63
20 changed files with 482 additions and 436 deletions
|
@ -403,7 +403,7 @@ func syncMirror(repoID string) {
|
|||
continue
|
||||
}
|
||||
|
||||
theCommits := models.ListToPushCommits(commits)
|
||||
theCommits := repository.ListToPushCommits(commits)
|
||||
if len(theCommits.Commits) > setting.UI.FeedMaxCommitNum {
|
||||
theCommits.Commits = theCommits.Commits[:setting.UI.FeedMaxCommitNum]
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/notification"
|
||||
"code.gitea.io/gitea/modules/repository"
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
||||
)
|
||||
|
||||
|
@ -43,7 +44,7 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error {
|
|||
}
|
||||
notification.NotifyPushCommits(
|
||||
rel.Publisher, rel.Repo, git.TagPrefix+rel.TagName,
|
||||
git.EmptySHA, commit.ID.String(), models.NewPushCommits())
|
||||
git.EmptySHA, commit.ID.String(), repository.NewPushCommits())
|
||||
notification.NotifyCreateRef(rel.Publisher, rel.Repo, "tag", git.TagPrefix+rel.TagName)
|
||||
}
|
||||
commit, err := gitRepo.GetTagCommit(rel.TagName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue