fix(ci): exclude test files from PR size classification (#2387)

* 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 <noreply@anthropic.com>

* ci: retrigger with skip-regression-check label

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Zaki <zaki@iqlusion.io>
This commit is contained in:
firat.sertgoz
2026-04-14 23:15:36 +03:00
committed by GitHub
parent d85c11dff2
commit 28c6a1520c

View File

@@ -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
')