-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add FORCE_VISIBILITY config value to force new repos to be public or private #24771
base: main
Are you sure you want to change the base?
Conversation
Why would you want to enforce public repos? I think it would be better to add a (per user/org) setting with a maximum of private repos as some kind of billing feature. |
Hi @KN4CK3R, I think this option would be interesting for companies. Everyone in the company should see all repositories, as there are no secrets between employees and teams. There is the possibility to configure force private, so why not force public as well? |
f82478d
to
a3494f7
Compare
Thanks for this PR! This will break existing configs (true/false paradigm wouldn't work anymore), this however can be solved. Instead of using the force_private config, you could add a new config value of |
Hi @techknowlogick, I prefer the parameter name |
yes, that's correct. Thanks for making those changes :) |
ff13a90
to
1497403
Compare
"Force Visibilty private" is particularly important for our use case. We need a Git environment for the school, which means that repositories are created here by minors. For reasons of copyright and data protection, it is therefore important that the content of user repositories is not published without being checked by a teacher. However for personal repositories "Force Visibilty private" should be permanent and not just during creation. |
Hi @svenzimmermann, |
@codefritzel: Thanks for the hint, my mistake. I just tested FORCE_PRIVATE=true again. |
This PR adds the feature to configure repositories as force public like force private. See #24059
The value
FORCE_VISIBILITY
has been added. The key type is a string, that is used similar toDEFAULT_PRIVATE
.FORCE_VISIBILITY
can take the following values:public - new repos must be public and existing ones cannot be switched to private
private - new repos must be private similar to previous
FORCE_PRIVATE=true
off - new repos can be private or public
For compatibility reasons
ForceVisibility = private
is set ifFORCE_PRIVATE=true
is configured.FORCE_PRIVATE
was marked as deprecated.