mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-06 09:39:44 +08:00
Add notification interface and refactor UI notifications (#5085)
* add notification interface and refactor UI notifications * add missing methods on notification interface and notifiy only issue status really changed * implement NotifyPullRequestReview for ui notification
This commit is contained in:
@ -580,7 +580,7 @@ func MergePullRequest(ctx *context.Context, form auth.MergePullRequestForm) {
|
||||
return
|
||||
}
|
||||
|
||||
notification.Service.NotifyIssue(pr.Issue, ctx.User.ID)
|
||||
notification.NotifyMergePullRequest(pr, ctx.User, ctx.Repo.GitRepo)
|
||||
|
||||
log.Trace("Pull request merged: %d", pr.ID)
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + com.ToStr(pr.Index))
|
||||
@ -888,7 +888,7 @@ func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm)
|
||||
return
|
||||
}
|
||||
|
||||
notification.Service.NotifyIssue(pullIssue, ctx.User.ID)
|
||||
notification.NotifyNewPullRequest(pullRequest)
|
||||
|
||||
log.Trace("Pull request created: %d/%d", repo.ID, pullIssue.ID)
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + com.ToStr(pullIssue.Index))
|
||||
|
Reference in New Issue
Block a user