-
-
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
Refactor mail notification #5110
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5110 +/- ##
==========================================
- Coverage 37.78% 37.75% -0.03%
==========================================
Files 323 325 +2
Lines 47596 47638 +42
==========================================
+ Hits 17986 17988 +2
- Misses 27025 27056 +31
- Partials 2585 2594 +9
Continue to review full report at Codecov.
|
extract from #4001 |
bab3e99
to
8f1b31b
Compare
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.
I don't much like having the multiple empty functions. I guess we need to move to more generic notify interface with typed event objects? Does accepting this PR help with that move or Is there a current bug that needs this?
I guess this PR helps to place things in to standard structure but I think that this might be better shown as a commit in a well structured PR that would compile and pass the tests at each step along the way. Was this extracted from such a larger commit?
modules/notification/mail/mail.go
Outdated
@@ -0,0 +1,126 @@ | |||
// Copyright 2018 The Gitea Authors. All rights reserved. |
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.
Could you update the date to 2019?
8f1b31b
to
9d13dc6
Compare
@zeripath This PR is focus on refactoring. It makes the notification interface clearer to add new feature or find the bugs. But I haven't fix any bug or implement new feature in this PR. I think that's why there are so many blank functions here. I think further PR could do that. This is extract from #4001, but that PR is too big to review. |
OK, can we create a
and then just reimplement the methods that need reimplementing? I appreciate that that just moves these empty methods elsewhere but then implementing a notifier becomes much easier. |
@zeripath good idea & done. |
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.
Thanks @lunny !
extract from #4001