- 
                Notifications
    You must be signed in to change notification settings 
- Fork 837
Feature: switch visibility with update_repo_settings #2537 #2541
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
          
     Merged
      
      
            Wauplin
  merged 11 commits into
  huggingface:main
from
WizKnight:feature/switch-visibility-with-repo-settings
  
      
      
   
  Sep 26, 2024 
      
    
  
     Merged
                    Changes from 8 commits
      Commits
    
    
            Show all changes
          
          
            11 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      de6794c
              
                Enhance `update_repo_settings` to manage repo visibility
              
              
                WizKnight eae6028
              
                Merge branch 'main' into feature/switch-visibility-with-repo-settings
              
              
                WizKnight 5a376f3
              
                Merge branch 'main' into feature/switch-visibility-with-repo-settings
              
              
                WizKnight 5e3aef1
              
                Merge branch 'main' into feature/switch-visibility-with-repo-settings
              
              
                WizKnight e169e96
              
                Enhance `update_repo_settings` to manage repo visibility
              
              
                WizKnight edf03d2
              
                Merge branch 'main' into feature/switch-visibility-with-repo-settings
              
              
                WizKnight 06e31db
              
                Enhance `update_repo_settings` to manage repo visibility
              
              
                WizKnight b06e6b4
              
                Enhance `update_repo_settings` to manage repo visibility
              
              
                WizKnight e68280c
              
                Enhance `update_repo_settings` to manage repo visibility
              
              
                WizKnight 93d87a6
              
                Merge branch 'main' into feature/switch-visibility-with-repo-settings
              
              
                WizKnight 8b13d08
              
                Apply suggestions from code review
              
              
                Wauplin File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|  | @@ -3524,6 +3524,7 @@ def delete_repo( | |||||
| if not missing_ok: | ||||||
| raise | ||||||
|  | ||||||
| @_deprecate_method(version="0.29", message="Please use `update_repo_settings` instead.") | ||||||
|         
                  hanouticelina marked this conversation as resolved.
              Show resolved
            Hide resolved | ||||||
| @validate_hf_hub_args | ||||||
| def update_repo_visibility( | ||||||
| self, | ||||||
|  | @@ -3535,6 +3536,8 @@ def update_repo_visibility( | |||||
| ) -> Dict[str, bool]: | ||||||
| """Update the visibility setting of a repository. | ||||||
|  | ||||||
| Deprecated. Use `update_repo_settings` instead. | ||||||
|  | ||||||
| Args: | ||||||
| repo_id (`str`, *optional*): | ||||||
| A namespace (user or an organization) and a repo name separated by a `/`. | ||||||
|  | @@ -3581,13 +3584,16 @@ def update_repo_settings( | |||||
| self, | ||||||
| repo_id: str, | ||||||
| *, | ||||||
| gated: Literal["auto", "manual", False] = False, | ||||||
| gated: Optional[Literal["auto", "manual", False]] = None, | ||||||
| private: Optional[bool] = None, | ||||||
| token: Union[str, bool, None] = None, | ||||||
| repo_type: Optional[str] = None, | ||||||
| ) -> None: | ||||||
| """ | ||||||
| Update the gated settings of a repository. | ||||||
| To give more control over how repos are used, the Hub allows repo authors to enable **access requests** for their repos. | ||||||
| Update the settings of a repository, including gated access and visibility. | ||||||
|  | ||||||
| To give more control over how repos are used, the Hub allows repo authors to enable | ||||||
| access requests for their repos, and also to set the visibility of the repo to private. | ||||||
|  | ||||||
| Args: | ||||||
| repo_id (`str`): | ||||||
|  | @@ -3596,14 +3602,16 @@ def update_repo_settings( | |||||
| The gated release status for the repository. | ||||||
|          | ||||||
| The gated release status for the repository. | |
| The gated status for the repository. If set to `None` (default), the `gated` setting of the repository won't be updated | 
        
          
              
                Outdated
          
        
      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.
        Suggested change
      
    | * False : The gated status for the repository. If set to `None` (default), the `gated` setting of the repository won't be updated. | |
| * False : The repository is not gated, and anyone can access it. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.