From 9858e36a4d9c51eb9189d53fad6d55fe32f2510f Mon Sep 17 00:00:00 2001 From: Stefan VDV Date: Wed, 30 Apr 2025 15:09:55 +1000 Subject: [PATCH 1/3] =?UTF-8?q?fix(internal):=20=F0=9F=94=A5=20Properly=20?= =?UTF-8?q?remove=20all=20references=20to=20the=20template=20"post"=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_components/create-post.tsx | 76 ++++++++++++++--------------- src/server/api/root.ts | 4 +- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/app/_components/create-post.tsx b/src/app/_components/create-post.tsx index da3a1c8..23405d1 100644 --- a/src/app/_components/create-post.tsx +++ b/src/app/_components/create-post.tsx @@ -1,43 +1,43 @@ -"use client"; +// "use client"; -import { useRouter } from "next/navigation"; -import { useState } from "react"; +// import { useRouter } from "next/navigation"; +// import { useState } from "react"; -import { api } from "~/trpc/react"; +// import { api } from "~/trpc/react"; -export function CreatePost() { - const router = useRouter(); - const [name, setName] = useState(""); +// export function CreatePost() { +// const router = useRouter(); +// const [name, setName] = useState(""); - const createPost = api.post.create.useMutation({ - onSuccess: () => { - router.refresh(); - setName(""); - }, - }); +// const createPost = api.post.create.useMutation({ +// onSuccess: () => { +// router.refresh(); +// setName(""); +// }, +// }); - return ( -
{ - e.preventDefault(); - createPost.mutate({ name }); - }} - className="flex flex-col gap-2" - > - setName(e.target.value)} - className="w-full rounded-full px-4 py-2 text-black" - /> - -
- ); -} +// return ( +//
{ +// e.preventDefault(); +// createPost.mutate({ name }); +// }} +// className="flex flex-col gap-2" +// > +// setName(e.target.value)} +// className="w-full rounded-full px-4 py-2 text-black" +// /> +// +//
+// ); +// } diff --git a/src/server/api/root.ts b/src/server/api/root.ts index b341fc4..2ce68ed 100644 --- a/src/server/api/root.ts +++ b/src/server/api/root.ts @@ -1,4 +1,4 @@ -import { postRouter } from "~/server/api/routers/post"; +//import { postRouter } from "~/server/api/routers/post"; import { createCallerFactory, createTRPCRouter } from "~/server/api/trpc"; /** @@ -7,7 +7,7 @@ import { createCallerFactory, createTRPCRouter } from "~/server/api/trpc"; * All routers added in /api/routers should be manually added here. */ export const appRouter = createTRPCRouter({ - post: postRouter, + //post: postRouter, }); // export type definition of API From 56828ee7de8ae9bcc3e8ea8ad61821cef755a102 Mon Sep 17 00:00:00 2001 From: Stefan VDV Date: Wed, 30 Apr 2025 15:18:12 +1000 Subject: [PATCH 2/3] =?UTF-8?q?fix(internal):=20=F0=9F=90=9B=20Coerce=20gi?= =?UTF-8?q?t=20PR=20ID=20env=20to=20a=20number?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/env.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/env.js b/src/env.js index d11757c..919f868 100644 --- a/src/env.js +++ b/src/env.js @@ -37,7 +37,7 @@ export const env = createEnv({ DISCORD_CLIENT_ID: optionalInDev(z.string()), DISCORD_CLIENT_SECRET: optionalInDev(z.string()), VERCEL_GIT_COMMIT_REF: z.string().optional(), - VERCEL_GIT_PULL_REQUEST_ID: z.number().int().optional(), + VERCEL_GIT_PULL_REQUEST_ID: z.coerce.number().int().optional(), }, /** From e994626c15f00346cd29b28b7940e6e93ea05747 Mon Sep 17 00:00:00 2001 From: Stefan VDV Date: Wed, 30 Apr 2025 15:19:38 +1000 Subject: [PATCH 3/3] =?UTF-8?q?fix(internal):=20=F0=9F=92=9A=20Fix=20db=20?= =?UTF-8?q?branching=20jobs=20being=20skipped=20due=20to=20event=20name=20?= =?UTF-8?q?change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/turso_branching.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/turso_branching.yaml b/.github/workflows/turso_branching.yaml index 018cc2f..a309c1b 100644 --- a/.github/workflows/turso_branching.yaml +++ b/.github/workflows/turso_branching.yaml @@ -52,7 +52,7 @@ jobs: name: Ensure the DB branch exists and is up to date needs: setup if: | - github.event_name == 'pull_request' && ( + github.event_name == 'pull_request_target' && ( github.event.action == 'synchronize' || github.event.action == 'opened' || github.event.action == 'reopened') @@ -98,7 +98,7 @@ jobs: name: Delete DB branch and migrate prod needs: setup if: | - github.event_name == 'pull_request' && + github.event_name == 'pull_request_target' && github.event.action == 'closed' runs-on: ubuntu-latest steps: