You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gh repo create: Prompt for owner when repo name is un-prefixed #6574
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
mislav commentedon Nov 7, 2022
Thanks for the suggestion! The idea and the UI sketch look good to us.
Prompt for owner when interactively creating repos