From 540bf9fa6d0d86297c9d575640798b718767bd9f Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 6 Sep 2023 02:37:47 +0800 Subject: Move notification interface to services layer (#26915) Extract from #22266 --- services/agit/agit.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'services/agit') diff --git a/services/agit/agit.go b/services/agit/agit.go index ac8c52d19c..a39034b025 100644 --- a/services/agit/agit.go +++ b/services/agit/agit.go @@ -14,8 +14,8 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/private" + notify_service "code.gitea.io/gitea/services/notify" pull_service "code.gitea.io/gitea/services/pull" ) @@ -208,9 +208,9 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git. } comment, err := pull_service.CreatePushPullComment(ctx, pusher, pr, oldCommitID, opts.NewCommitIDs[i]) if err == nil && comment != nil { - notification.NotifyPullRequestPushCommits(ctx, pusher, pr, comment) + notify_service.PullRequestPushCommits(ctx, pusher, pr, comment) } - notification.NotifyPullRequestSynchronized(ctx, pusher, pr) + notify_service.PullRequestSynchronized(ctx, pusher, pr) isForcePush := comment != nil && comment.IsForcePush results = append(results, private.HookProcReceiveRefResult{ -- cgit v1.2.3