From 1c21c2a6a77d8cce3e89f6403db0c3aae647dd06 Mon Sep 17 00:00:00 2001 From: iHildy Date: Sat, 16 Aug 2025 15:27:46 -0500 Subject: [PATCH] fix issue.created bigint and number type mismatch error --- src/types/github.ts | 12 ++++++------ src/types/schemas.ts | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/types/github.ts b/src/types/github.ts index cee3fe8..54d52cc 100644 --- a/src/types/github.ts +++ b/src/types/github.ts @@ -5,7 +5,7 @@ export interface GitHubLabelEvent { name: string; }; issue: { - id: bigint; + id: number; number: number; state: "open" | "closed"; labels: Array<{ @@ -13,7 +13,7 @@ export interface GitHubLabelEvent { }>; }; repository: { - id: bigint; + id: number; name: string; full_name: string; owner: { @@ -28,7 +28,7 @@ export interface GitHubLabelEvent { // GitHub webhook payload interfaces export interface GitHubAccount { - id: bigint; + id: number; login: string; type: string; } @@ -46,12 +46,12 @@ export interface GitHubInstallation { } export interface GitHubWebhookRepository { - id: bigint; + id: number; name: string; full_name: string; - owner?: GitHubAccount; // Optional for installation webhooks + owner?: GitHubAccount; private: boolean; - html_url?: string; // Optional for installation webhooks + html_url?: string; description?: string; } diff --git a/src/types/schemas.ts b/src/types/schemas.ts index eb950b3..4512885 100644 --- a/src/types/schemas.ts +++ b/src/types/schemas.ts @@ -7,7 +7,7 @@ export const GitHubLabelEventSchema = z.object({ name: z.string(), }), issue: z.object({ - id: z.bigint(), + id: z.number(), number: z.number(), state: z.enum(["open", "closed"]), labels: z.array( @@ -17,7 +17,7 @@ export const GitHubLabelEventSchema = z.object({ ), }), repository: z.object({ - id: z.bigint(), + id: z.number(), name: z.string(), full_name: z.string(), owner: z.object({ @@ -34,14 +34,14 @@ export const GitHubWebhookEventSchema = z.object({ action: z.string(), issue: z .object({ - id: z.bigint(), + id: z.number(), number: z.number(), state: z.string(), labels: z.array(z.object({ name: z.string() })).optional(), }) .optional(), repository: z.object({ - id: z.bigint(), + id: z.number(), name: z.string(), full_name: z.string(), owner: z.object({