import { loadConfig } from '../config.js'; import { Db } from '../db.js'; import { runPoll } from '../poller.js'; import { getLastRateLimit } from '../github/client.js'; const config = loadConfig(); const db = new Db(); console.log(`search: ${config.searchQuery}\n`); const result = await runPoll(config, db); const stateIcon: Record = { fail: '✗', running: '◐', pending: '·', pass: '✓', skipped: '–', none: ' ', }; for (const pr of db.getOpenSnapshots()) { const cats = pr.categories .map((c) => `${c.category}:${stateIcon[c.state]}${c.total ? ` ${c.passed}/${c.total}` : ''}`) .join(' '); console.log( `${pr.repo}#${pr.number} [${pr.reviewState}${pr.unresolvedThreads ? ` ${pr.unresolvedThreads} open` : ''}] ${cats} ${pr.title.slice(0, 60)}`, ); const other = pr.categories.find((c) => c.category === 'other'); if (other && other.checks.length > 0) { console.log(` other checks: ${other.checks.map((c) => c.name).join(', ')}`); } } console.log( `\n${result.prCount} PRs, ${result.changedPrIds.length} changed, ${result.newEventCount} new events`, ); console.log(`rate limit: ${JSON.stringify(getLastRateLimit())}`);