Skip to content

"Keep this code private" is ticked by default even when a user is on a free plan #2165

Closed

Description

@chriscn

Description

When pushing a repo to GitHub the keep this code private is ticked by default. Most people have public plans so either stop this from being ticked on default or provide an option in the settings.

Version

GitHub Desktop version: 0.6.2

OS version: Mac OS X Sierra

Reproduces how often: 100%

Activity

  1. joshaber commented on Jun 30, 2017

    @joshaber
    Contributor

    Right, we should default to private if the user's on a paid plan because we don't want them to accidentally leak code. But for users on free plans, we should uncheck it and disable it.

  2. changed the title [-]"Keep this code private" is ticked by default. [/-] [+]"Keep this code private" is ticked by default even when a user is on a free plan[/+] on Aug 10, 2017
  3. added
    help wanted
    on Aug 10, 2017
  4. joshaber commented on Aug 18, 2017

    @joshaber
    Contributor

    @chriscn mind if we re-open this? I think it's a legitimate issue 😄

  5. reopened this on Sep 2, 2017
  6. chriscn commented on Sep 2, 2017

    @chriscn
    Author

    @joshaber Sure, don't see emails of the github chain. I thought we were finished 👍

  7. self-assigned this
    on Sep 4, 2017
  8. OiYouYeahYou commented on Oct 30, 2017

    @OiYouYeahYou
    Contributor

    Preamble

    I am assuming:

    1. An unpaid account can publish a private repo to a paid organisation (Given permissions)
    2. A paid account cannot publish a private repo to an unpaid organisation

    Therefore, it is necessary to know if a publishing target is paid, not just the user account. Extending the user account class is easy. But for organisations, this is a different matter. As currently, the user/orgs endpoint does not include the plan object according to the Github API. Meaning that if a Target Based behaviour is used, the orgs/:org enpoint needs to be called somewhere, either:

    1. At the initial user/orgs call, orgs/:org is called for each.
    2. Or when an org is selected in the publish dialog a single orgs/:org call is made.

    Behaviors

    Existing:- Privacy always defaults to true and enabled, and is not altered when switching orgs

    Suggested:- When User is unpaid: Set to false and disable

    Target Based:- When publisihng target is unpaid: set to false and disable

    Middle of the road:-

    1. When the user is selected:
      1. If unpaid: set false and disable
      2. If paid: set true and enabled
    2. If Org is selected: default to true and enabled, blind of org payment plan

    User controlled default preference:- Setting in options that dictates whether the initial state of the publish dialog is public/private

    Example usage: Target-Based

    1. User (Paid or Unpaid) opens publish repo
    2. Selects paid org
    3. Toggles privacy off
    4. Selects unpaid org, Private option is set to false and disabled
    5. Selects paid org

    When this happens, should user selection be remembered? Or, should the dialog always default to private when a paid target is selected?

    After trying

    Aiming at adding a target based behaviour, the lack of plan data in the user/orgs endpoint stopped me. I am concerned about adding extra and excessive API calls just to add this feature. So I tried the Middle of the road behaviour, but disliked this behaviour because it was inconsistent.

    I tried default preference in options, which I came to prefer for its simplicity. So users who don't use private repos can have false as default, to save the faff when publishing a repo for the first time.

  9. shiftkey commented on Dec 27, 2017

    @shiftkey
    Member

    @niik were you still working on this?

  10. removed their assignment
    on Jan 12, 2018
  11. niik commented on Jan 12, 2018

    @niik
    Member

    @niik were you still working on this?

    @shiftkey Sorry, I missed this during the holidays. No, I started but never finished, removing my assignment.

  12. damaneice commented on Jul 1, 2018

    @damaneice
    Contributor

    is this issue good to pick up? What should be the desired behavior?

  13. shiftkey commented on Jul 2, 2018

    @shiftkey
    Member

    @damaneice yeah, this would be a nice one to solve.

    I think the notes from @OiYouYeahYou in #2165 (comment) are a more complete list of the desired behaviour than "user on free plan cannot create private repository", but there might be some more organisation permissions that we need to look at through the API.

  14. 5 remaining items

  15. shiftkey commented on Jul 25, 2018

    @shiftkey
    Member

    @chriscn I'd prefer to flip these inputs around because the checkbox is now dependent on what organization you've chosen

    This means the flow becomes:

    • select the organization to target (or skip over it)
    • see the checkbox is either disabled (unable to create private repository) with a helpful message (inline/tooltip/whatever) or enabled (and default to private as usual)
    • if user is not sure, they can try a different organization
    • if user is really not sure, they can navigate to an external link in the app to understand more about the issue (where to find this?)
    • otherwise they can continue on to publish the repository with whatever state the checkbox is in
  16. billygriffin commented on Sep 4, 2018

    @billygriffin
    Contributor

    The only thing that I think is missing above is, via @iAmWillShepherd, we should give the user a nice way to go and upgrade directly on the site if the "Keep code private" isn't available to them. A link with something like, "Upgrade your plan to publish private repos" or something would be great. Let's just not make them search for it.

  17. damaneice commented on Sep 17, 2018

    @damaneice
    Contributor
  18. shiftkey commented on Sep 17, 2018

    @shiftkey
    Member

    @damaneice that works

  19. shiftkey commented on Jan 8, 2019

    @shiftkey
    Member

    Just bumping this issue with the news that "GitHub Free" accounts are able to create unlimited private repositories. There's some limitations around the available features and number of collaborators that can be added to these repositories, but this means we might need to review this feature and identify what changes (if any) need to happen.

    @niik also raised some concerns about the logic for checking in #5273 (review) which we should consider - it talks about users needing to upgrade their plan, which isn't a thing they'll need to do when publishing now on free plans - but mentions interactions and things to be mindful of around this area.

  20. chriscn commented on Jan 8, 2019

    @chriscn
    Author

    Was about to come here and say this. In my opinion it should default to private to begin with.

  21. shiftkey commented on Jan 8, 2019

    @shiftkey
    Member

    @chriscn that's the initial behaviour, which now aligns nicely with the GitHub Free changes. Maybe this makes it a non-issue now? Let's hold off on closing this until we've had a chance to review things (the issue was from 18 months ago).

  22. removed
    help wanted
    on Jan 8, 2019
  23. chriscn commented on Jan 8, 2019

    @chriscn
    Author

    Someone could have realistically had two kids in the time between this being opened and now 😛Thank you for all your work on this.

  24. removed their assignment
    on Feb 6, 2019
  25. billygriffin commented on May 6, 2019

    @billygriffin
    Contributor

    Hi folks! We ran through a few scenarios internally and it looks like this issue is no longer relevant because of free private repos. The primary differentiator at the repo level is that free private repos cannot have more than 3 collaborators. Because this is never an issue before a repo is published to GitHub, we don't need to be concerned with that here.

    The only place where this can go awry is when you're trying to publish a private repo to a free org. In this case, however, you'll get an error message and it won't let you publish, which seems reasonable.

    We're happy to revisit if there are flows that make this fall down in the app, but for now we're going to close this issue. Thanks @damaneice and others who have weighed in!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions