-
Notifications
You must be signed in to change notification settings - Fork 559
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
Make sure create_repo respect organization privacy settings #2679
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some nit suggestions on the private
argument docstring – otherwise lgtm! thanks!
Co-authored-by: Célina <[email protected]>
Thanks for the suggestion :) |
see slack thread (private)
Enterprise Hub allows organizations to force all repositories to be private. Since
create_repo
assumes that a repo is public whenprivate=True
is not explicitly passed, an error is thrown by the serverThis is because
private: False
is passed by default (since #1001 😕). This PR updates this by makingNone
the default value forprivate
and send the value to the server only when explicitly set by the user. This should make the life of Enterprise Hub users much easier (today they need to explicitly passprivate=True
in their calls).Note: tests are currently failing (need an update in staging org settings).
Note 2: we'll have to update many (most?)
.push_to_hub
signature in the HF ecosystem to also passNone
whenever appropriate. I'll open PRs once that's merged.TIL: better listen to the boss #1001 (comment)