forked from forgejo/forgejo
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:
parent
dd62ca7ba9
commit
ea619b39b2
11 changed files with 378 additions and 44 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue