Skip to content

gh repo create: Prompt for owner when repo name is un-prefixed #6574

Description

@twelvelabs

Describe the feature or problem you’d like to solve

When creating new repos interactively, users are only prompted for a repo name, and it's not immediately clear that names can be prefixed in order to create the repo in an Organization.

Proposed solution

If I enter an un-prefixed name, I'd like to be presented with a select prompt containing my personal account name (the default) and all organizations I am a member of:

? Repository name my-project
? Repository owner  [Use arrows to move, type to filter]
  climbcomp
  gostamp
> twelvelabs

If I'm not a member of any orgs, then I would not see the "Repository owner" prompt.

Selecting an org would cause that prefix to be added to my-project. Selecting my personal account would leave the name un-prefixed.

The org selection could also be used to determine which visibilities to present (re: #2106).

Additional context

This info seems easily retrieved via gh api /user and gh api /user/orgs, so I guess it's a matter of whether y'all think the UX is worth the added complexity. Personally, I like the explicitness of the prompt: "this is exactly where your repo will be created".

Activity

  1. added and removed on Nov 7, 2022
  2. mislav commented on Nov 7, 2022

    @mislav
    Contributor

    Thanks for the suggestion! The idea and the UI sketch look good to us.

  3. added a commit that references this issue on Nov 8, 2022
    569076e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions