Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt for owner when interactively creating repos #6578

Merged
merged 2 commits into from Dec 8, 2022

Conversation

twelvelabs
Copy link
Contributor

Fixes #6574

Adds logic to prompt for an owner when interactively creating repos (following the logic agreed upon in #6574):

Screen Shot 2022-11-07 at 11 33 35 PM

Screen Shot 2022-11-08 at 12 00 53 AM

@twelvelabs twelvelabs requested a review from a team as a code owner November 8, 2022 06:13
@twelvelabs twelvelabs requested review from mislav and removed request for a team November 8, 2022 06:13
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Nov 8, 2022
@cliAutomation cliAutomation added this to Needs review 🤔 in The GitHub CLI Nov 8, 2022
if idx := strings.IndexRune(targetRepo, '/'); idx > 0 {
targetRepo = targetRepo[0:idx+1] + shared.NormalizeRepoName(targetRepo[idx+1:])
if idx := strings.IndexRune(opts.Name, '/'); idx > 0 {
targetRepo = opts.Name[0:idx+1] + shared.NormalizeRepoName(opts.Name[idx+1:])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discovered this bug while testing. The confirmation prompt was mangling target names w/ org prefixes.

@samcoe samcoe self-assigned this Nov 16, 2022
@samcoe samcoe self-requested a review November 16, 2022 08:53
Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@twelvelabs This looks great. Thanks for the well thought out feature and adding tests.

The GitHub CLI automation moved this from Needs review 🤔 to Needs to be merged 🎉 Dec 5, 2022
@samcoe samcoe merged commit 0636042 into cli:trunk Dec 8, 2022
The GitHub CLI automation moved this from Needs to be merged 🎉 to Pending Release 🥚 Dec 8, 2022
@github-actions github-actions bot moved this from Pending Release 🥚 to Done 💤 in The GitHub CLI Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external pull request originating outside of the CLI core team
Projects
No open projects
The GitHub CLI
  
Done 💤
Development

Successfully merging this pull request may close these issues.

gh repo create: Prompt for owner when repo name is un-prefixed
3 participants