1
0
Fork 0
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:
Lunny Xiao 2018-10-18 19:23:05 +08:00 committed by GitHub
parent dd62ca7ba9
commit ea619b39b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 378 additions and 44 deletions

View file

@ -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))