Skip to content

Feature: switch visibility with update_repo_settings #2537

@Wauplin

Description

@Wauplin

Follow-up PR after #2502.

Now that we have a generic update_repo_settings, we can add the option to switch visibility status of a repo. This would be a drop-in replacement for update_repo_visibility:

- update_repo_visibility(repo_id, private=True)
+ update_repo_settings(repo_id, private=True)

TODO:

  • add a private attribute to update_repo_settings
  • make both gated and private attributes optional (default to None)
  • check update_repo_settings inputs => either gated is passed, or private, or both. If both gated and private are None, raise a ValueError.
  • add gated and private to the request payload only if not None
  • update update_repo_settings docstring
  • update all references of update_repo_visibility in docs
  • add @_deprecate_method decorator to update_repo_visibility (will be removed in 0.29.x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions