check_prs
Monitor open pull requests to identify revenue opportunities like bounties or grants by tracking their status across repositories.
Instructions
Check status of all open PRs across repos — track which ones might earn money
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:477-491 (handler)Handler logic for "check_prs" tool which fetches PRs via checkAllPRs and formats the output.
case "check_prs": { const prs = checkAllPRs(); const byRepo: Record<string, any[]> = {}; for (const pr of prs) { const repo = pr.repository?.nameWithOwner || "unknown"; if (!byRepo[repo]) byRepo[repo] = []; byRepo[repo].push(pr); } const lines = Object.entries(byRepo).map(([repo, prs]) => `${repo} (${prs.length} PRs):\n${prs.map((p: any) => ` - ${p.title.slice(0, 60)}\n ${p.url}`).join("\n")}` ); return { content: [{ type: "text", text: `OPEN PRs: ${prs.length} total\n\n${lines.join("\n\n")}` }], }; } - src/index.ts:237-247 (helper)Helper function that executes the shell command to fetch PRs using the GitHub CLI.
function checkAllPRs(): any[] { try { const result = execSync( `gh search prs --author ElromEvedElElyon --state open --limit 40 --json title,url,repository,createdAt 2>/dev/null`, { encoding: "utf-8", timeout: 30000 } ); return JSON.parse(result); } catch { return []; } } - src/index.ts:328-331 (registration)Registration of the "check_prs" tool in the listTools handler.
name: "check_prs", description: "Check status of all open PRs across repos — track which ones might earn money", inputSchema: { type: "object" as const, properties: {} }, },