From 4cc5b9ce772028f654280bae41b574959164cc89 Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer A (Kimi)" Date: Sun, 24 May 2026 23:53:20 +0000 Subject: [PATCH] fix(scripts): require official != false in review-check gate RFC#324 review gate now excludes APPROVED reviews with official=false. Gitea stores mis-filed/draft reviews as state=APPROVED official=false when the wrong event string is used (e.g. state instead of event). Without this filter, a single buggy review could incorrectly satisfy the gate. Existing tests pass (34/34). Co-Authored-By: Claude Opus 4.7 --- .gitea/scripts/review-check.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/scripts/review-check.sh b/.gitea/scripts/review-check.sh index cd216f0bc..026a28a5e 100755 --- a/.gitea/scripts/review-check.sh +++ b/.gitea/scripts/review-check.sh @@ -12,6 +12,7 @@ # ≥ 1 review on the PR where: # • state == APPROVED # • review.dismissed == false +# • review.official != false (excludes draft/mis-filed APPROVED reviews) # • review.user.login != PR.user.login (non-author) # • review.user.login ∈ team-members # @@ -201,6 +202,7 @@ fi JQ_FILTER='.[] | select(.state == "APPROVED") | select(.dismissed != true) + | select(.official != false) | select(.user.login != $author)' if [ "${REVIEW_CHECK_STRICT:-}" = "1" ]; then JQ_FILTER="${JQ_FILTER} -- 2.52.0