From edb7759dc033c1d629959eebbe151aa585609a67 Mon Sep 17 00:00:00 2001 From: Arjun Komath Date: Mon, 15 Dec 2025 19:19:06 +1100 Subject: [PATCH] Fix post draft url --- apps/web/inngest/jobs/process-github-changelog.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/web/inngest/jobs/process-github-changelog.ts b/apps/web/inngest/jobs/process-github-changelog.ts index a99aa7d..b6c178c 100644 --- a/apps/web/inngest/jobs/process-github-changelog.ts +++ b/apps/web/inngest/jobs/process-github-changelog.ts @@ -50,7 +50,7 @@ export const processGitHubChangelog = inngestClient.createFunction( const { data: page, error: pageError } = await supabaseAdmin .from("pages") - .select("id, user_id, url_slug, title") + .select("id, user_id, title") .eq("id", installation.page_id) .single(); @@ -117,7 +117,7 @@ export const processGitHubChangelog = inngestClient.createFunction( if (existingRef) { postId = existingRef.post_id; - dashboardUrl = `${baseUrl}/page/${page.url_slug}/posts/${postId}`; + dashboardUrl = `${baseUrl}/pages/${page.id}/${postId}`; const { data: newGenerationCount, error: updateError } = await supabaseAdmin.rpc("update_github_changelog_draft", { @@ -133,7 +133,9 @@ export const processGitHubChangelog = inngestClient.createFunction( postId, context: { owner, repo, prNumber }, }); - throw new Error(`Failed to update changelog draft: ${updateError.message}`); + throw new Error( + `Failed to update changelog draft: ${updateError.message}` + ); } await createPRComment( @@ -159,7 +161,7 @@ export const processGitHubChangelog = inngestClient.createFunction( }); postId = post.id; - dashboardUrl = `${baseUrl}/page/${page.url_slug}/posts/${postId}`; + dashboardUrl = `${baseUrl}/pages/${page.id}/${postId}`; const commentBody = `📝 **Changelog draft created!**\n\n${changelog.summary}\n\n**[View and edit your draft →](${dashboardUrl})**\n\nOnce you're happy with it, you can publish it from the dashboard.`; @@ -189,7 +191,9 @@ export const processGitHubChangelog = inngestClient.createFunction( postId, context: { owner, repo, prNumber }, }); - throw new Error(`Failed to create GitHub post reference: ${insertError.message}`); + throw new Error( + `Failed to create GitHub post reference: ${insertError.message}` + ); } }