forked from forgejo/forgejo
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>
This commit is contained in:
parent
2de0752be7
commit
6151e69d95
5 changed files with 17 additions and 31 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue