mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-28 16:47:01 +09: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:
1 parent
dd62ca7ba9
commit
ea619b39b2
11 files changed
+378
-44
No files matched your search
@@ -112,6 +112,10 @@ func (issue *Issue) GetPullRequest() (pr *PullRequest, err error) {
|
||||
}
|
||||
|
||||
pr, err = getPullRequestByIssueID(x, issue.ID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pr.Issue = issue
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -239,6 +239,8 @@ func getCurrentReview(e Engine, reviewer *User, issue *Issue) (*Review, error) {
|
||||
if len(reviews) == 0 {
|
||||
return nil, ErrReviewNotExist{}
|
||||
}
|
||||
reviews[0].Reviewer = reviewer
|
||||
reviews[0].Issue = issue
|
||||
return reviews[0], nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user