summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/comments/comments.go2
-rw-r--r--services/issue/assignee.go2
-rw-r--r--services/issue/content.go2
-rw-r--r--services/issue/issue.go6
-rw-r--r--services/issue/label.go4
-rw-r--r--services/issue/status.go2
-rw-r--r--services/pull/pull.go2
-rw-r--r--services/pull/review.go6
8 files changed, 13 insertions, 13 deletions
diff --git a/services/comments/comments.go b/services/comments/comments.go
index 6f63060c45..c1b3ab73c9 100644
--- a/services/comments/comments.go
+++ b/services/comments/comments.go
@@ -28,7 +28,7 @@ func CreateIssueComment(doer *user_model.User, repo *repo_model.Repository, issu
return nil, err
}
- mentions, err := issue.FindAndUpdateIssueMentions(db.DefaultContext, doer, comment.Content)
+ mentions, err := models.FindAndUpdateIssueMentions(db.DefaultContext, issue, doer, comment.Content)
if err != nil {
return nil, err
}
diff --git a/services/issue/assignee.go b/services/issue/assignee.go
index 86d653dfa6..479c9cbb13 100644
--- a/services/issue/assignee.go
+++ b/services/issue/assignee.go
@@ -42,7 +42,7 @@ func DeleteNotPassedAssignee(issue *models.Issue, doer *user_model.User, assigne
// ToggleAssignee changes a user between assigned and not assigned for this issue, and make issue comment for it.
func ToggleAssignee(issue *models.Issue, doer *user_model.User, assigneeID int64) (removed bool, comment *models.Comment, err error) {
- removed, comment, err = issue.ToggleAssignee(doer, assigneeID)
+ removed, comment, err = models.ToggleIssueAssignee(issue, doer, assigneeID)
if err != nil {
return
}
diff --git a/services/issue/content.go b/services/issue/content.go
index 6d7883090b..a60878479b 100644
--- a/services/issue/content.go
+++ b/services/issue/content.go
@@ -14,7 +14,7 @@ import (
func ChangeContent(issue *models.Issue, doer *user_model.User, content string) (err error) {
oldContent := issue.Content
- if err := issue.ChangeContent(doer, content); err != nil {
+ if err := models.ChangeIssueContent(issue, doer, content); err != nil {
return err
}
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
}
diff --git a/services/issue/label.go b/services/issue/label.go
index 96df7ed345..9971be326c 100644
--- a/services/issue/label.go
+++ b/services/issue/label.go
@@ -12,7 +12,7 @@ import (
// ClearLabels clears all of an issue's labels
func ClearLabels(issue *models.Issue, doer *user_model.User) (err error) {
- if err = issue.ClearLabels(doer); err != nil {
+ if err = models.ClearIssueLabels(issue, doer); err != nil {
return
}
@@ -73,7 +73,7 @@ func ReplaceLabels(issue *models.Issue, doer *user_model.User, labels []*models.
return err
}
- if err := issue.ReplaceLabels(labels, doer); err != nil {
+ if err := models.ReplaceIssueLabels(issue, labels, doer); err != nil {
return err
}
diff --git a/services/issue/status.go b/services/issue/status.go
index 64fbccd26a..1af4508b09 100644
--- a/services/issue/status.go
+++ b/services/issue/status.go
@@ -14,7 +14,7 @@ import (
// ChangeStatus changes issue status to open or closed.
func ChangeStatus(issue *models.Issue, doer *user_model.User, closed bool) error {
- comment, err := issue.ChangeStatus(doer, closed)
+ comment, err := models.ChangeIssueStatus(issue, doer, closed)
if err != nil {
if models.IsErrDependenciesLeft(err) && closed {
if err := models.FinishIssueStopwatchIfPossible(db.DefaultContext, doer, issue); err != nil {
diff --git a/services/pull/pull.go b/services/pull/pull.go
index 7a746d937f..562912cab9 100644
--- a/services/pull/pull.go
+++ b/services/pull/pull.go
@@ -69,7 +69,7 @@ func NewPullRequest(ctx context.Context, repo *repo_model.Repository, pull *mode
return err
}
- mentions, err := pull.FindAndUpdateIssueMentions(ctx, pull.Poster, pull.Content)
+ mentions, err := models.FindAndUpdateIssueMentions(ctx, pull, pull.Poster, pull.Content)
if err != nil {
return err
}
diff --git a/services/pull/review.go b/services/pull/review.go
index 7f9797579a..111e959a87 100644
--- a/services/pull/review.go
+++ b/services/pull/review.go
@@ -61,7 +61,7 @@ func CreateCodeComment(ctx context.Context, doer *user_model.User, gitRepo *git.
return nil, err
}
- mentions, err := issue.FindAndUpdateIssueMentions(ctx, doer, comment.Content)
+ mentions, err := models.FindAndUpdateIssueMentions(ctx, issue, doer, comment.Content)
if err != nil {
return nil, err
}
@@ -248,7 +248,7 @@ func SubmitReview(ctx context.Context, doer *user_model.User, gitRepo *git.Repos
return nil, nil, err
}
- mentions, err := issue.FindAndUpdateIssueMentions(ctx, doer, comm.Content)
+ mentions, err := models.FindAndUpdateIssueMentions(ctx, issue, doer, comm.Content)
if err != nil {
return nil, nil, err
}
@@ -258,7 +258,7 @@ func SubmitReview(ctx context.Context, doer *user_model.User, gitRepo *git.Repos
for _, lines := range review.CodeComments {
for _, comments := range lines {
for _, codeComment := range comments {
- mentions, err := issue.FindAndUpdateIssueMentions(ctx, doer, codeComment.Content)
+ mentions, err := models.FindAndUpdateIssueMentions(ctx, issue, doer, codeComment.Content)
if err != nil {
return nil, nil, err
}