You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Keep this code private" is ticked by default even when a user is on a free plan #2165
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.
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.
Reacted by GortMcTabs, Christopher Nethercott, zac garby, Jed Fox, Laura Sofia Heimann and Nico Novikov
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
An unpaid account can publish a private repo to a paid organisation (Given permissions)
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:
At the initial user/orgs call, orgs/:org is called for each.
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:-
When the user is selected:
If unpaid: set false and disable
If paid: set true and enabled
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
User (Paid or Unpaid) opens publish repo
Selects paid org
Toggles privacy off
Selects unpaid org, Private option is set to false and disabled
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.
@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.
@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
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.
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.
@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).
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!
Activity
joshaber commentedon Jun 30, 2017
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.
[-]"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[/+]joshaber commentedon Aug 18, 2017
@chriscn mind if we re-open this? I think it's a legitimate issue 😄
chriscn commentedon Sep 2, 2017
@joshaber Sure, don't see emails of the github chain. I thought we were finished 👍
OiYouYeahYou commentedon Oct 30, 2017
Preamble
I am assuming:
Therefore, it is necessary to know if a
publishing targetis paid, not just the user account. Extending the user account class is easy. But for organisations, this is a different matter. As currently, theuser/orgsendpoint does not include the plan object according to the Github API. Meaning that if a Target Based behaviour is used, theorgs/:orgenpoint needs to be called somewhere, either:user/orgscall,orgs/:orgis called for each.orgs/:orgcall 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:-
User controlled default preference:- Setting in options that dictates whether the initial state of the publish dialog is public/private
Example usage: Target-Based
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/orgsendpoint 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.
shiftkey commentedon Dec 27, 2017
@niik were you still working on this?
niik commentedon Jan 12, 2018
@shiftkey Sorry, I missed this during the holidays. No, I started but never finished, removing my assignment.
damaneice commentedon Jul 1, 2018
is this issue good to pick up? What should be the desired behavior?
shiftkey commentedon Jul 2, 2018
@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.
5 remaining items
shiftkey commentedon Jul 25, 2018
@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:
billygriffin commentedon Sep 4, 2018
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.
damaneice commentedon Sep 17, 2018
is the link to the upgrade page? https://github.com/settings/billing
shiftkey commentedon Sep 17, 2018
@damaneice that works
shiftkey commentedon Jan 8, 2019
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.
chriscn commentedon Jan 8, 2019
Was about to come here and say this. In my opinion it should default to private to begin with.
shiftkey commentedon Jan 8, 2019
@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).
chriscn commentedon Jan 8, 2019
Someone could have realistically had two kids in the time between this being opened and now 😛Thank you for all your work on this.
billygriffin commentedon May 6, 2019
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!