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:05:09 UTC
(incubator-answer-plugins) branch main updated: feat(basic_reviewer): If the post does not need review, return directly
This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git
The following commit(s) were added to refs/heads/main by this push:
new 27305e2 feat(basic_reviewer): If the post does not need review, return directly
27305e2 is described below
commit 27305e2a6aecff83a74c9b253e7f626ec76b1f19
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