-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add notification interface and refactor UI notifications #5085
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5085 +/- ##
=========================================
+ Coverage 37.39% 37.4% +<.01%
=========================================
Files 306 307 +1
Lines 45397 45552 +155
=========================================
+ Hits 16977 17037 +60
- Misses 25962 26060 +98
+ Partials 2458 2455 -3
Continue to review full report at Codecov.
|
routers/repo/issue.go
Outdated
@@ -1014,6 +1014,8 @@ func UpdateIssueStatus(ctx *context.Context) { | |||
ctx.ServerError("ChangeStatus", err) | |||
return | |||
} | |||
|
|||
notification.NotifyIssueChangeStatus(ctx.User, issue, isClosed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only send notifications if status really change. In my understanding this will send a notification if isClosed = true
and the issue is already closed.
Thank you for this PR. I think this re-factoring is really needed! |
da1627d
to
ef91809
Compare
@BetaCat0 done. |
This pull request create a notification interface so that all notifications, i.e. ui, actions, webhooks, mails and etc. will only need to implement the interface. So that the code will be more easy. This is extract from #4001. It's the first step of serval pull requests from #4001. I think it will be easier to review.