Skip to content

Add support for "INTERNAL" visibility in the repoCreate command #798

Description

@hunterjm

Describe the feature or problem you’d like to solve

The GraphQL API supports creating repos as "Internal" for plans that support it, but it is not currently implemented in the cli.

Proposed solution

I propose we add a new repoCreateCmd flag called internal here and default it to false. We can then update the logic here to add support for internal visibility. My recommendation would be to add the check for internal between PRIVATE and PUBLIC so the visibility is descending. i.e. If a user submits both the public and internal flags, the repo will be public. If they submit neither, it will still be private.

Additional context

If approved, I'd be happy to open a PR implementing this.

Activity

  1. mislav commented on Apr 17, 2020

    @mislav
    Contributor

    Thanks for a great feature request!

    My recommendation would be to add the check for internal between PRIVATE and PUBLIC so the visibility is descending. i.e. If a user submits both the public and internal flags, the repo will be public. If they submit neither, it will still be private.

    I don't anticipate that people will be including both --public and --internal, but if they do, I would lean to first respecting the most restrictive one (--internal). When inputs are ambiguous, I believe that software should choose the most conservative default, especially when it comes to permissions. Would you agree?

    Alternatively, we could just raise a usage error that --public and --internal are mutually exclusive.

  2. RobCannon commented on Jul 6, 2020

    @RobCannon

    I would raise an error to the user that --public and --internal are mutually exclusive. That way it is obvious to the user that they selected conflicting options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions