Move notification interface to services layer (#26915)

Extract from #22266
This commit is contained in:
Lunny Xiao 2023-09-06 02:37:47 +08:00 committed by GitHub
parent 084eacb5d4
commit 540bf9fa6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 972 additions and 969 deletions

View file

@ -31,7 +31,6 @@ import (
"code.gitea.io/gitea/modules/git"
issue_template "code.gitea.io/gitea/modules/issue/template"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/notification"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/upload"
@ -42,6 +41,7 @@ import (
"code.gitea.io/gitea/services/automerge"
"code.gitea.io/gitea/services/forms"
"code.gitea.io/gitea/services/gitdiff"
notify_service "code.gitea.io/gitea/services/notify"
pull_service "code.gitea.io/gitea/services/pull"
repo_service "code.gitea.io/gitea/services/repository"
@ -1672,7 +1672,7 @@ func UpdatePullRequestTarget(ctx *context.Context) {
}
return
}
notification.NotifyPullRequestChangeTargetBranch(ctx, ctx.Doer, pr, targetBranch)
notify_service.PullRequestChangeTargetBranch(ctx, ctx.Doer, pr, targetBranch)
ctx.JSON(http.StatusOK, map[string]any{
"base_branch": pr.BaseBranch,