mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-06 16:17:34 -07:00
chore: optimize process scripts to adhere to guardrails
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { execSync } from 'node:child_process';
|
||||
|
||||
try {
|
||||
const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);
|
||||
const dateString = sevenDaysAgo.toISOString().split('T')[0];
|
||||
|
||||
const output = execSync(`gh run list --status failure --limit 1000 --json databaseId --created ">=${dateString}"`, { encoding: 'utf-8' });
|
||||
const runs = JSON.parse(output);
|
||||
process.stdout.write(JSON.stringify({
|
||||
metric: 'test_flakiness',
|
||||
value: runs.length,
|
||||
timestamp: new Date().toISOString()
|
||||
}));
|
||||
} catch (err) {
|
||||
process.stderr.write(err.message);
|
||||
process.exit(1);
|
||||
}
|
||||
Reference in New Issue
Block a user