You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by li...@apache.org on 2024/03/18 12:04:29 UTC
(incubator-answer-plugins) branch feat/review created (now a29101e)
This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a change to branch feat/review
in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git
at a29101e feat(basic_reviewer): If the post does not need review, return directly
This branch includes the following new commits:
new a29101e feat(basic_reviewer): If the post does not need review, return directly
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(incubator-answer-plugins) 01/01: feat(basic_reviewer): If the post does not need review, return directly
Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a commit to branch feat/review
in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git
commit a29101ee14874ffb2042619ddd6f749ecfeab0f0
Author: LinkinStars <li...@foxmail.com>
AuthorDate: Mon Mar 18 20:04:20 2024 +0800
feat(basic_reviewer): If the post does not need review, return directly
---
reviewer-basic/basic.go | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/reviewer-basic/basic.go b/reviewer-basic/basic.go
index bb1df6f..d396c61 100644
--- a/reviewer-basic/basic.go
+++ b/reviewer-basic/basic.go
@@ -54,6 +54,10 @@ func (r *Reviewer) Info() plugin.Info {
func (r *Reviewer) Review(content *plugin.ReviewContent) (result *plugin.ReviewResult) {
result = &plugin.ReviewResult{Approved: true}
+ // If the post does not need review, return directly
+ if !r.Config.PostNeedReview {
+ return result
+ }
// If the author is admin, no need to review
if content.Author.Role > 1 {
return result