fix(orgs): enable organization creation defaults with --auto-create#390
Conversation
The API only auto-creates organizations when both organization_creation_defaults.enabled and the nested automatic_organization_creation.enabled are true. The --auto-create flag previously patched only the nested flag, so on instances where the umbrella setting was never enabled the command succeeded silently but no organization was ever auto-created. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: e1f9753 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
--auto-create
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughWalkthroughUpdated the organization auto-creation documentation and release note to describe the required umbrella and nested defaults. Expanded implementation comments to explain the API requirement and no-op behavior. Updated the enable command test to verify both Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
Summary
Found while reviewing clerk/clerk#2961, where the docs work around it by telling agents to patch the parent flag manually.
clerk enable orgs --auto-createpatched onlyorganization_creation_defaults.automatic_organization_creation.enabled. The API gates auto-creation on the umbrellaorganization_creation_defaults.enabledtoo, so on instances where creation defaults were never enabled the command succeeded — and no organization was ever auto-created.Perhaps it's this way for some reason, but it tripped me up when verifying the docs contribution.
Changes
--auto-createnow sends both flags in one patch.enabled: trueon an already-enabled instance is a no-op, so the command stays idempotent.References
🤖 Generated with Claude Code