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

hub create in an organization without a visibility flag should use the org's default #2727

Open
davidstosik opened this issue Mar 11, 2021 · 0 comments
Labels

Comments

@davidstosik
Copy link

davidstosik commented Mar 11, 2021

The problem I'm trying to solve:
I accidentally created a public repository by running hub create my-org/my-repo.

How I imagine hub could expose this functionality:
When running the command above, it would be nice if it can default to the organization's default visibility. In this case, the repository would have been "Internal" instead of "Public".

hub could keep the use of -p, --private to create private repos, but would also need the following flags in order to override the organization's defaults:

  • -P, --public to force the new repository to be public
  • -i, --internal to make the new repository visible internally

Ideally, it would be nice if I could also add a setting to hub in order to force all the repos I create with it to be private by default (unless I explicitly pass a flag to say otherwise).

image

In GitHub's API reference (Create an organization repository), it seems the private and visibility parameters are not required. Is it reasonable to assume that not passing any value in the request would default the repository's visibility to the organization's default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant