Server core: config, GitHub GraphQL polling, SQLite persistence, timeline ingestion
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgBEW6qAwgn2fcQbA2f4ZQ
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
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<string, string> = {
|
||||
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())}`);
|
||||
Reference in New Issue
Block a user