From 5041be36f0ed6ee998e2a6ff0e02127c00367189 Mon Sep 17 00:00:00 2001 From: Aidan McAlister Date: Fri, 5 Sep 2025 15:00:28 -0400 Subject: [PATCH 1/3] feat: `user-agent` sent to mgmt api --- create-db-worker/src/index.ts | 6 ++++-- create-db/index.js | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/create-db-worker/src/index.ts b/create-db-worker/src/index.ts index a4c7066..5b53420 100644 --- a/create-db-worker/src/index.ts +++ b/create-db-worker/src/index.ts @@ -94,6 +94,7 @@ export default { region?: string; name?: string; analytics?: { eventName?: string; properties?: Record }; + userAgent?: string; }; let body: CreateDbBody = {}; @@ -104,16 +105,17 @@ export default { return new Response('Invalid JSON body', { status: 400 }); } - const { region, name, analytics: analyticsData } = body; + const { region, name, analytics: analyticsData, userAgent } = body; if (!region || !name) { return new Response('Missing region or name in request body', { status: 400 }); } - + console.log('userAgent:', userAgent); const prismaResponse = await fetch('https://api.prisma.io/v1/projects', { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${env.INTEGRATION_TOKEN}`, + 'User-Agent': userAgent || '', }, body: JSON.stringify({ region, diff --git a/create-db/index.js b/create-db/index.js index e794ddc..3c0c058 100755 --- a/create-db/index.js +++ b/create-db/index.js @@ -431,7 +431,8 @@ async function createDatabase(name, region, userAgent, silent = false) { body: JSON.stringify({ region, name, - utm_source: userAgent || CLI_NAME, + utm_source: CLI_NAME, + userAgent, }), }); From 1a0102648853b4ff740ee2fda09ae1348374eaa9 Mon Sep 17 00:00:00 2001 From: Aidan McAlister Date: Thu, 9 Oct 2025 10:50:06 -0400 Subject: [PATCH 2/3] fix: empty commit From 188bba4fc54b5f173079484e1b073029be60c2a4 Mon Sep 17 00:00:00 2001 From: Aidan McAlister Date: Thu, 9 Oct 2025 11:03:08 -0400 Subject: [PATCH 3/3] feat: added coderabbit yaml --- .coderabbit.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .coderabbit.yaml diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 0000000..32aff8c --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,23 @@ +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json +# yaml template to refer to https://docs.coderabbit.ai/reference/yaml-template#enterprise +language: "en-US" +reviews: + collapse_walkthrough: false + profile: "chill" + high_level_summary: true + request_changes_workflow: true + poem: false + in_progress_fortune: false + sequence_diagrams: false + suggested_labels: false + suggested_reviewers: false + auto_review: + enabled: true + drafts: false + finishing_touches: + docstrings: + enabled: false + unit_tests: + enabled: false +chat: + art: false