From 28c6a1520c42a8679dd5014c9a0f4f1dcaa18d7b Mon Sep 17 00:00:00 2001 From: "firat.sertgoz" Date: Tue, 14 Apr 2026 23:15:36 +0300 Subject: [PATCH] fix(ci): exclude test files from PR size classification (#2387) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(ci): exclude test files from PR size classification Test code shouldn't inflate PR size labels — a 1-line fix with 500 lines of tests was getting classified as XL instead of XS. Co-Authored-By: Claude Opus 4.6 * ci: retrigger with skip-regression-check label Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Claude Opus 4.6 Co-authored-by: Zaki --- .github/scripts/pr-labeler.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/scripts/pr-labeler.sh b/.github/scripts/pr-labeler.sh index 96dc0fa748..78d41a344a 100755 --- a/.github/scripts/pr-labeler.sh +++ b/.github/scripts/pr-labeler.sh @@ -43,7 +43,10 @@ classify_size() { local total total=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/files" \ --paginate --jq ' - [.[] | select(.filename | test("\\.(md|txt|rst|adoc)$") | not) | .changes] + [.[] + | select(.filename | test("\\.(md|txt|rst|adoc)$") | not) + | select(.filename | test("^tests/|_test\\.rs$|_tests\\.rs$|/tests/|\\.test\\.[jt]sx?$|\\.spec\\.[jt]sx?$") | not) + | .changes] | add // 0 ')