summaryrefslogtreecommitdiffstats
path: root/services/issue/issue.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-03-29 22:57:33 +0800
committerGitHub <noreply@github.com>2022-03-29 16:57:33 +0200
commit74731c3a5aea71c81e4ca75bde96154f3adf3cfa (patch)
tree64b01935ab9912de71318eac447721e41b200135 /services/issue/issue.go
parentbd97736b9c7a16023bc9abf17be6157284f655b1 (diff)
downloadgitea-74731c3a5aea71c81e4ca75bde96154f3adf3cfa.tar.gz
gitea-74731c3a5aea71c81e4ca75bde96154f3adf3cfa.zip
Move some issue methods as functions (#19255)
* Move some issue methods as functions * Fix bug
Diffstat (limited to 'services/issue/issue.go')
-rw-r--r--services/issue/issue.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/issue/issue.go b/services/issue/issue.go
index 6e5e4bfd37..6bc3959979 100644
--- a/services/issue/issue.go
+++ b/services/issue/issue.go
@@ -28,7 +28,7 @@ func NewIssue(repo *repo_model.Repository, issue *models.Issue, labelIDs []int64
}
}
- mentions, err := issue.FindAndUpdateIssueMentions(db.DefaultContext, issue.Poster, issue.Content)
+ mentions, err := models.FindAndUpdateIssueMentions(db.DefaultContext, issue, issue.Poster, issue.Content)
if err != nil {
return err
}
@@ -49,7 +49,7 @@ func ChangeTitle(issue *models.Issue, doer *user_model.User, title string) (err
oldTitle := issue.Title
issue.Title = title
- if err = issue.ChangeTitle(doer, oldTitle); err != nil {
+ if err = models.ChangeIssueTitle(issue, doer, oldTitle); err != nil {
return
}
@@ -63,7 +63,7 @@ func ChangeIssueRef(issue *models.Issue, doer *user_model.User, ref string) erro
oldRef := issue.Ref
issue.Ref = ref
- if err := issue.ChangeRef(doer, oldRef); err != nil {
+ if err := models.ChangeIssueRef(issue, doer, oldRef); err != nil {
return err
}