summaryrefslogtreecommitdiffstats
path: root/services/pull/comment.go
diff options
context:
space:
mode:
authorcaicandong <50507092+CaiCandong@users.noreply.github.com>2023-08-04 21:34:34 +0800
committerGitHub <noreply@github.com>2023-08-04 13:34:34 +0000
commit6151e69d9509c08e25e93743d6b31211371e81d0 (patch)
tree1e115a29a615805d0cc533b5de242dfe5adde80a /services/pull/comment.go
parent2de0752be7aaab65fe670518d00175be479ea054 (diff)
downloadgitea-6151e69d9509c08e25e93743d6b31211371e81d0.tar.gz
gitea-6151e69d9509c08e25e93743d6b31211371e81d0.zip
Delete `issue_service.CreateComment` (#26298)
I noticed that `issue_service.CreateComment` adds transaction operations on `issues_model.CreateComment`, we can merge the two functions and we can avoid calling each other's methods in the `services` layer. Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'services/pull/comment.go')
-rw-r--r--services/pull/comment.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/services/pull/comment.go b/services/pull/comment.go
index 24dfd8af0c..14fba52f1e 100644
--- a/services/pull/comment.go
+++ b/services/pull/comment.go
@@ -11,7 +11,6 @@ import (
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/json"
- issue_service "code.gitea.io/gitea/services/issue"
)
// getCommitIDsFromRepo get commit IDs from repo in between oldCommitID and newCommitID
@@ -90,7 +89,7 @@ func CreatePushPullComment(ctx context.Context, pusher *user_model.User, pr *iss
ops.Content = string(dataJSON)
- comment, err = issue_service.CreateComment(ctx, ops)
+ comment, err = issues_model.CreateComment(ctx, ops)
return comment, err
}