Skip to content
← Public packages

@kody/kody-factory

Forkable multi-project software factory: signals, priority queue, project UI, sweep job. Agent runners and Sentry reach it by events.

FollowFork

Files

collect.ts

9 lines · 579 B · TypeScript
import githubRequest from 'kody:@kody/github/request'
import { collectDataset, type Request } from './collect-core.ts'
import { targetRepo } from './shared.ts'

/** Collect the last week of GitHub Actions data for the target repo through the factory's GitHub connection (GET only). */
export async function collect(input: { maxApiCalls?: number; days?: number; now?: Date } = {}) {
	const request: Request = async ({ path }) => (await githubRequest({ path, method: 'GET' })) as Awaited<ReturnType<Request>>
	return await collectDataset({ repo: targetRepo, request, ...input })
}