From 9b5459fa498dff86dbf630ea377ffcb31732698c Mon Sep 17 00:00:00 2001 From: Catherine Renelle <32781029+catrenelle@users.noreply.github.com> Date: Thu, 26 Feb 2026 07:28:06 -0500 Subject: [PATCH] Seed default tags and categories for new tenants New tenants auto-provisioned via hostname get 5 default tags (Bug, Feature, Enhancement, Urgent, Documentation) and 4 categories (Frontend, Backend, Design, Infrastructure). Co-Authored-By: Claude Opus 4.6 --- src/lib/server/tenant.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/lib/server/tenant.ts b/src/lib/server/tenant.ts index c7b7d0c..011ae29 100644 --- a/src/lib/server/tenant.ts +++ b/src/lib/server/tenant.ts @@ -45,6 +45,16 @@ export async function resolveTenant(hostname: string): Promise { // Any hostname that reaches this app was pointed here via DNS, // so it's intentional. Auto-create a tenant for it. @@ -57,6 +67,12 @@ async function autoProvisionTenant(host: string): Promise { slug, hostnames: { create: { hostname: host, isPrimary: true } + }, + tags: { + create: DEFAULT_TAGS + }, + categories: { + create: DEFAULT_CATEGORIES.map((n) => ({ name: n })) } } });