Addgated_mode for create repo#1730
Conversation
Add ProtectedMode enum (1=protected/application-based, 2=off/normal) to constants.py. Pass protected_mode parameter through create_model, create_dataset, create_repo, set_repo_visibility, and CLI ms create. Only effective when visibility is private; warns and ignores otherwise. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces support for a protected_mode parameter when creating or updating the visibility of private model and dataset repositories, including a new CLI argument --protected_mode. The feedback suggests preserving the existing ProtectedMode of a repository when updating its visibility rather than defaulting to 'off' (2) when the parameter is not explicitly provided, and refactoring the fallback logic directly into the payload dictionaries.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
protected mode指的是申请制? |
是的,protected_mode=1 -- 申请制, protected_mode=2 -- 正常private repo; |
gated_mode for create repo
Add
gated_modefor create_repo (model, dataset), add param for CLI