hub icon indicating copy to clipboard operation
hub copied to clipboard

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

Open davidstosik opened this issue 5 years ago • 0 comments

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?

davidstosik avatar Mar 11 '21 01:03 davidstosik