You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by ku...@apache.org on 2024/04/16 09:14:33 UTC

(incubator-answer-plugins) branch feat/reviewer-basic updated: feat(review): delete single check post amount

This is an automated email from the ASF dual-hosted git repository.

kumfo pushed a commit to branch feat/reviewer-basic
in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git


The following commit(s) were added to refs/heads/feat/reviewer-basic by this push:
     new 3666c1a  feat(review): delete single check post amount
3666c1a is described below

commit 3666c1ac080e4acf3e4eab8788a633d7c60e1652
Author: kumfo <ku...@sifou.com>
AuthorDate: Tue Apr 16 17:14:23 2024 +0800

    feat(review): delete single check post amount
---
 reviewer-basic/basic.go | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/reviewer-basic/basic.go b/reviewer-basic/basic.go
index 14556e8..53521be 100644
--- a/reviewer-basic/basic.go
+++ b/reviewer-basic/basic.go
@@ -68,13 +68,11 @@ func (r *Reviewer) Review(content *plugin.ReviewContent) (result *plugin.ReviewR
 		}
 		return result
 	}
+
 	// If the author is admin, no need to review
 	if content.Author.Role > 1 {
 		return result
 	}
-	if content.Author.ApprovedQuestionAmount+content.Author.ApprovedAnswerAmount > 1 {
-		return result
-	}
 
 	keywords := strings.Split(r.Config.PostReviewKeywords, "\n")
 	disallowedKeywords := strings.Split(r.Config.PostDisallowedKeywords, "\n")