Browse Source

feat(onboarding): pass org and project slugs to wizard (#77457)

Ogi 5 months ago
parent
commit
2ecc2f47ee

+ 7 - 2
static/app/gettingStartedDocs/javascript/nextjs.tsx

@@ -33,9 +33,14 @@ import {trackAnalytics} from 'sentry/utils/analytics';
 
 type Params = DocsParams;
 
-const getInstallSnippet = ({isSelfHosted, urlPrefix}: Params) => {
+const getInstallSnippet = ({
+  isSelfHosted,
+  urlPrefix,
+  organization,
+  projectSlug,
+}: Params) => {
   const urlParam = !isSelfHosted && urlPrefix ? `--url ${urlPrefix}` : '';
-  return `npx @sentry/wizard@latest -i nextjs ${urlParam}`;
+  return `npx @sentry/wizard@latest -i nextjs ${urlParam} --org ${organization.slug} --project ${projectSlug}`;
 };
 
 const getInstallConfig = (params: Params) => {

+ 2 - 2
static/app/gettingStartedDocs/javascript/remix.tsx

@@ -29,7 +29,7 @@ import {t, tct} from 'sentry/locale';
 
 type Params = DocsParams;
 
-const getConfigStep = ({isSelfHosted, urlPrefix}: Params) => {
+const getConfigStep = ({isSelfHosted, urlPrefix, organization, projectSlug}: Params) => {
   const urlParam = !isSelfHosted && urlPrefix ? `--url ${urlPrefix}` : '';
   return [
     {
@@ -42,7 +42,7 @@ const getConfigStep = ({isSelfHosted, urlPrefix}: Params) => {
         }
       ),
       language: 'bash',
-      code: `npx @sentry/wizard@latest -i remix ${urlParam}`,
+      code: `npx @sentry/wizard@latest -i remix ${urlParam}  --org ${organization.slug} --project ${projectSlug}`,
     },
   ];
 };

+ 7 - 2
static/app/gettingStartedDocs/javascript/sveltekit.tsx

@@ -29,7 +29,12 @@ import {t, tct} from 'sentry/locale';
 
 type Params = DocsParams;
 
-const getInstallConfig = ({isSelfHosted, urlPrefix}: Params) => {
+const getInstallConfig = ({
+  isSelfHosted,
+  urlPrefix,
+  organization,
+  projectSlug,
+}: Params) => {
   const urlParam = !isSelfHosted && urlPrefix ? `--url ${urlPrefix}` : '';
 
   return [
@@ -46,7 +51,7 @@ const getInstallConfig = ({isSelfHosted, urlPrefix}: Params) => {
       configurations: [
         {
           language: 'bash',
-          code: `npx @sentry/wizard@latest -i sveltekit ${urlParam}`,
+          code: `npx @sentry/wizard@latest -i sveltekit ${urlParam}  --org ${organization.slug} --project ${projectSlug}`,
         },
       ],
     },