Skip to content

project create: auto-create a default team when the org has no teams #303

@betegon

Description

@betegon

Summary

When running sentry project create in an organization that has no teams, the CLI throws a hard error and stops. It should instead offer to create a default team automatically so the user isn't blocked.

Current Behavior

src/commands/project/create.ts (lines 151–154) throws:

No teams found in {orgSlug}.
Create a team first, then try again.

The user has to manually create a team via sentry api or the Sentry UI, then retry.

Proposal

When no teams exist (or when the specified --team is not found), automatically create a default team and proceed with project creation. This keeps the project create flow uninterrupted.

Ref: #237 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions