summaryrefslogtreecommitdiffstats
path: root/services/pull
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/pull
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/pull')
-rw-r--r--services/pull/pull.go2
-rw-r--r--services/pull/review.go6
2 files changed, 4 insertions, 4 deletions
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
}