fix(ci): optimize regex parsing in PR review script

- Optimize regex execution loop by caching the test output string.
- Ensure `debug_regex.js` is removed.
- Verified local build and lint pass.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-01-31 23:24:56 +00:00
1 parent cb680737ef
commit 3718e9a690
1 file changed
+2 -1
+2 -1
View File
@@ -146,8 +146,9 @@ async function reviewPR(prNumber, baseRef) {
// Extract failing test files
const failingTests = [];
const failureRegex = /✖\s+(tests\/[\w\-\.\/]+)\s+failed with exit code 1/g;
const testOutput = testRes.stdout + '\n' + testRes.stderr;
let match;
while ((match = failureRegex.exec(testRes.stdout + '\n' + testRes.stderr)) !== null) {
while ((match = failureRegex.exec(testOutput)) !== null) {
failingTests.push(match[1]);
}