mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 04:42:57 +00:00
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:
1 parent
cb680737ef
commit
3718e9a690
1 file changed
+2
-1
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user