-
-
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
Uniform an abstract notification layer for ui, mail, action, webhook and indexer #4001
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4001 +/- ##
==========================================
+ Coverage 20.18% 20.21% +0.03%
==========================================
Files 156 156
Lines 31168 30837 -331
==========================================
- Hits 6292 6235 -57
+ Misses 23918 23658 -260
+ Partials 958 944 -14
Continue to review full report at Codecov.
|
receiver notification.NotifyReceiver = &indexerReceiver{} | ||
) | ||
|
||
func ini() { |
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.
Think this should be init
here as well
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.
done.
receiver notification.NotifyReceiver = &actionReceiver{} | ||
) | ||
|
||
func ini() { |
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.
Think this should be init
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.
done.
routers/api/v1/repo/pull.go
Outdated
@@ -8,6 +8,8 @@ import ( | |||
"fmt" | |||
"strings" | |||
|
|||
"code.gitea.io/gitea/modules/notification" | |||
|
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.
Why is this in a separate import paragraph?
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.
done.
package webhook | ||
|
||
import ( | ||
"code.gitea.io/git" |
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.
code.gitea.io/git
is an external package?
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.
Yes, it is not inside of gitea. IMO
8ffa982
to
796805c
Compare
159abc0
to
8b6c568
Compare
When an event occupied, many notifications will be fired. This PR uniforms them as an abstract notification layer so that you can easily add new events or new receivers and don't change the codes of event occupied.