feat: pass org and project names to provisioning API#384
Open
feat: pass org and project names to provisioning API#384
Conversation
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
b18412d to
6256741
Compare
f55f7ca to
f6c8a72
Compare
- Organization name: "{name}'s Organization" when the user provides
their name, sent via configuration.organization_name
- Project name: basename of cwd (e.g. "my-nextjs-app"), sent via
configuration.project_name on the resources request
- Falls back to server defaults when not provided (Wizard (email)
for org, Default project for project)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pass email local part (e.g. "matt" from "matt@example.com") as the user name so organization_name gets set to "matt's Organization" instead of falling back to "Wizard (email)" - Add tests for project_name passthrough and omission - 8/8 provisioning tests pass, 457/460 full suite pass Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of using email prefix for org name and basename(cwd) for project, now parses `git remote get-url origin` to extract both: - github.com/AcmeCorp/my-app -> org="AcmeCorp", project="my-app" Fallbacks: - No git remote: org from email domain (skip freemail), project from directory name - CLI overrides via --org-name and --project-name (future) provisionNewAccount now takes an opts object with orgName/projectName instead of positional args. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
f6c8a72 to
e0fd993
Compare
Use POSTHOG_US_CLIENT_ID for production and POSTHOG_DEV_CLIENT_ID for dev, matching the OAuthApplication client_ids in each environment. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When the wizard provisions a new account via the PKCE flow, the organization gets named "Wizard (email)" and the project gets named "Default project" - not helpful.
Changes
Detects org and project names from
git remote get-url origin:github.com/AcmeCorp/my-app-> org=AcmeCorp, project=my-appFallbacks when no git remote:
matt@stripe.com->stripebasename(cwd)-> e.g./Users/matt/projects/my-app->my-appWizard (email)/Default project)Adds
--org-nameand--project-nameCLI arguments (+POSTHOG_WIZARD_ORG_NAME/POSTHOG_WIZARD_PROJECT_NAMEenv vars) to explicitly override auto-detection:When provided, these take precedence over the git remote / email domain detection.
Depends on PostHog/posthog#53493 (server-side support for
configuration.organization_nameandconfiguration.project_name).How did you test this code?
github.com/AcmeCorp/analytics-dashboard-> org="AcmeCorp", project="analytics-dashboard"in DBdev@stripe.com-> org="stripe"dev@gmail.com-> org=undefined (server default)Publish to changelog?
No
🤖 Generated with Claude Code