Skip to content

Prompt for owner when interactively creating repos - #6578

Merged
samcoe merged 2 commits into
cli:trunkfrom
twelvelabs:owner-prompt
Dec 8, 2022
Merged

samcoe merged 2 commits into
cli:trunkfrom
twelvelabs:owner-prompt

Conversation

@twelvelabs

Copy link
Copy Markdown
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
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
Copy Markdown
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

@samcoe samcoe left a comment •

Copy link
Copy Markdown
Contributor

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.

@samcoe
samcoe merged commit 0636042 into cli:trunk Dec 8, 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

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants