Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 4 additions & 2 deletions create-db-worker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export default {
region?: string;
name?: string;
analytics?: { eventName?: string; properties?: Record<string, unknown> };
userAgent?: string;
};

let body: CreateDbBody = {};
Expand All @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion create-db/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
});

Expand Down