Files
gemini-cli/tools/gemini-cli-bot/metrics/scripts/open_prs.ts
T
2026-04-24 17:16:20 +00:00

21 lines
408 B
TypeScript

/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { execSync } from 'node:child_process';
try {
const count = execSync(
'gh pr list --state open --limit 1000 --json number --jq length',
{
encoding: 'utf-8',
},
).trim();
console.log(`open_prs,${count}`);
} catch {
// Fallback if gh fails or no PRs found
console.log('open_prs,0');
}