1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import { z } from "zod";
export const GitHubConfig = z.object({
user: z.string().optional(), // falls back to env GITHUB_USER / authed user
limit: z.number().int().min(1).max(30).default(10),
});
export type GitHubConfig = z.infer<typeof GitHubConfig>;
export const GitHubPayload = z.object({
login: z.string(),
publicRepos: z.number(),
followers: z.number(),
events: z.array(
z.object({
type: z.string(),
repo: z.string(),
createdAt: z.string(),
}),
),
});
export type GitHubPayload = z.infer<typeof GitHubPayload>;
|