Skip to content

Commit

Permalink
feat(wizard-ui): Forward slugs to auth page (#686)
Browse files Browse the repository at this point in the history
Forward org and project slug to auth page.

Part of getsentry/sentry#78323
  • Loading branch information
ArthurKnaus authored Oct 9, 2024
1 parent 9d0bb56 commit 0bdb7ed
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- feat: Forward slugs to auth page ([#686](https://github.com/getsentry/sentry-wizard/pull/686))

## 3.33.0

- feat: Only format changed files with Prettier ([#670](https://github.com/getsentry/sentry-wizard/pull/670))
Expand Down
12 changes: 12 additions & 0 deletions src/utils/clack-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,8 @@ export async function getOrAskForProjectData(
promoCode: options.promoCode,
url: sentryUrl,
platform: platform,
orgSlug: options.orgSlug,
projectSlug: options.projectSlug,
}),
);

Expand Down Expand Up @@ -999,6 +1001,8 @@ async function askForWizardLogin(options: {
| 'apple-ios'
| 'android'
| 'react-native';
orgSlug?: string;
projectSlug?: string;
}): Promise<WizardProjectData> {
Sentry.setTag('has-promo-code', !!options.promoCode);

Expand Down Expand Up @@ -1039,6 +1043,14 @@ async function askForWizardLogin(options: {
`${options.url}account/settings/wizard/${wizardHash!}/`,
);

if (options.orgSlug) {
loginUrl.searchParams.set('org_slug', options.orgSlug);
}

if (options.projectSlug) {
loginUrl.searchParams.set('project_slug', options.projectSlug);
}

if (!hasSentryAccount) {
loginUrl.searchParams.set('signup', '1');
if (options.platform) {
Expand Down

0 comments on commit 0bdb7ed

Please sign in to comment.