Skip to content
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

feat: add the notification mechanism implementation #4527

Merged
merged 17 commits into from
Sep 28, 2023

Conversation

guqing
Copy link
Member

@guqing guqing commented Aug 31, 2023

What type of PR is this?

/kind feature
/milestone 2.10.x
/area core

What this PR does / why we need it:

新增消息和通知机制的实现

how to test it?

  1. 执行以下命令配置发件服务
curl -u admin:admin -X POST 'http://localhost:8090/apis/api.console.halo.run/v1alpha1/notifiers/default-email-notifier/senderConfig' \
--header 'Content-Type: application/json' \
--data-raw '{
    "displayName": "Halo Team",
    "username": "{发件使用的邮箱}",
    "password": "{发件邮箱密码}",
    "host": "smtp.exmail.qq.com",
    "port": "587"
}'
  1. 评论文章或页面可以收到通知
  2. 文章/页面作者是评论者不发送新评论通知,回复者是评论作者不发送回复通知

Which issue(s) this PR fixes:

Fixes #4045

Does this PR introduce a user-facing change?

新增消息和通知机制的实现

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Aug 31, 2023

@guqing: The provided milestone is not valid for this repository. Milestones in this repository: [1.6.x, 2.7.x, 2.8.x, 2.9.0, 2.9.x, Backlog]

Use /milestone clear to clear the milestone.

In response to this:

What type of PR is this?

/kind feature
/milestone 2.10.x
/area core

What this PR does / why we need it:

新增消息和通知机制的实现

Which issue(s) this PR fixes:

Fixes #4045

Does this PR introduce a user-facing change?

新增消息和通知机制的实现

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. area/core Issues or PRs related to the Halo Core labels Aug 31, 2023
@guqing guqing requested review from ruibaby and LIlGG and removed request for lan-yonghui August 31, 2023 04:43
@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

Merging #4527 (9604758) into main (86db26a) will increase coverage by 0.73%.
The diff coverage is 70.23%.

@@             Coverage Diff              @@
##               main    #4527      +/-   ##
============================================
+ Coverage     61.05%   61.79%   +0.73%     
- Complexity     2610     2780     +170     
============================================
  Files           379      402      +23     
  Lines         13606    14568     +962     
  Branches        960     1009      +49     
============================================
+ Hits           8307     9002     +695     
- Misses         4832     5077     +245     
- Partials        467      489      +22     
Files Coverage Δ
.../app/core/extension/reconciler/PostReconciler.java 68.42% <100.00%> (+2.38%) ⬆️
...a/run/halo/app/event/post/CommentCreatedEvent.java 100.00% <100.00%> (ø)
...ava/run/halo/app/event/post/ReplyCreatedEvent.java 100.00% <100.00%> (ø)
...ain/java/run/halo/app/infra/SchemeInitializer.java 100.00% <100.00%> (ø)
...otification/DefaultNotificationTemplateRender.java 100.00% <100.00%> (ø)
...cation/ReasonNotificationTemplateSelectorImpl.java 100.00% <100.00%> (ø)
...alo/app/plugin/SharedApplicationContextHolder.java 97.14% <100.00%> (+0.59%) ⬆️
...app/security/authorization/AuthorizingVisitor.java 80.00% <ø> (+6.66%) ⬆️
...pp/security/authorization/DefaultRuleResolver.java 75.00% <100.00%> (+3.20%) ⬆️
...n/halo/app/security/authorization/RequestInfo.java 93.54% <100.00%> (+0.44%) ⬆️
... and 27 more

... and 2 files with indirect coverage changes

@guqing guqing force-pushed the feature/notification branch from 0c58b31 to d904c68 Compare August 31, 2023 05:41
@guqing guqing added this to the 2.10.x milestone Sep 8, 2023
@guqing guqing force-pushed the feature/notification branch from fe1eb75 to a572c51 Compare September 8, 2023 08:33
@guqing guqing marked this pull request as ready for review September 8, 2023 08:35
@guqing guqing force-pushed the feature/notification branch 3 times, most recently from 287257a to 0661fe3 Compare September 13, 2023 04:31
Signed-off-by: guqing <1484563614@qq.com>
@guqing guqing force-pushed the feature/notification branch from bddbb51 to a3561ad Compare September 14, 2023 13:12
@guqing guqing changed the title [WIP] feat: add the notification mechanism implementation feat: add the notification mechanism implementation Sep 14, 2023
@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 14, 2023
@guqing
Copy link
Member Author

guqing commented Sep 20, 2023

/ping @halo-dev/sig-halo

@guqing guqing requested a review from ruibaby September 25, 2023 02:49
@f2c-ci-robot f2c-ci-robot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 25, 2023
# Conflicts:
#	application/src/main/resources/extensions/role-template-authenticated.yaml
@f2c-ci-robot f2c-ci-robot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 25, 2023
@f2c-ci-robot f2c-ci-robot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 26, 2023
@JohnNiang JohnNiang modified the milestones: 2.10.x, 2.10.0 Sep 27, 2023
# Conflicts:
#	application/src/main/resources/extensions/role-template-authenticated.yaml
@f2c-ci-robot f2c-ci-robot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 27, 2023
@guqing guqing force-pushed the feature/notification branch from f58e8f6 to 8418b42 Compare September 27, 2023 07:50
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 28, 2023
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Sep 28, 2023
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Sep 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot merged commit 9454f44 into halo-dev:main Sep 28, 2023
2 checks passed
@guqing guqing deleted the feature/notification branch October 8, 2023 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

需要一个消息通知机制
4 participants